]> granicus.if.org Git - nethack/commitdiff
fix B12001 - ?--More--single line menu
authornethack.rankin <nethack.rankin>
Tue, 17 Sep 2002 06:35:49 +0000 (06:35 +0000)
committernethack.rankin <nethack.rankin>
Tue, 17 Sep 2002 06:35:49 +0000 (06:35 +0000)
     From a bug report:
3.4.0 broke the ability to pick the only listed inventory letter when
user typed '?' during object selection and one candidate was listed on
the top line followed by --More--.

What do you want to throw? [b or ?*] ?
b - 7 +0 daggers (alternate weapon; not wielded).--More--b
<behaved as if user hit ESC instead of 'b' but didn't say "Never mind.">

(Dismissing --More-- the normal way and getting a new selection prompt
worked as usual.)  The problem was caused by changes in getobj's count
handling; the message_menu() routine isn't able to handle counts but
display_pickinv left the count as 0 while caller expects -1 for "count
not specified".

     This was a core bug but I put the fixes entry under "tty" since
no other interfaces are affected.

doc/fixes34.1
src/invent.c

index 029608800c8bf0f61e57d2ceb2b3b48d5b7cd9f5..840f402c3a53de098ac42e35d87d22a659b85f46 100644 (file)
@@ -275,22 +275,23 @@ win32tty: respond only to mouse clicks not mouse movement
 win32tty: allow ^C to abort the game at the "Who are you?" prompt
 win32tty: fix truncated score list
 win32tty: prevent ALT+CTRL from sending NUL to core with the meta bit set
-X11: restore support for non-square tiles when USE_XPM is defined
 Gnome: add support for non-square tiles
-tty: remove #define DEBUG that forced debug behavior in production builds
-X11: getlin dialog got steadily narrower each time it was used
-unix: install recover command into GAMEDIR by default
-tty: correctly handle an empty TERM environment variable
-tty: don't lose messages when ESC has canceled their display
-tty: clear topl after pickup_burden prompt
 Gnome: destroy main game windows correctly
 Gnome: Dylan Alex Simon's port of KDE-style worn window
 Gnome: Dylan Alex Simon's port of KDE-style hero cursor color
-tty: support terms where turning off inverse video turns off color too
 Gnome/Linux: more portable getres*id workaround
+X11: restore support for non-square tiles when USE_XPM is defined
+X11: getlin dialog got steadily narrower each time it was used
 msdos: compiling without NO_TERMS resulted in a link-time error
 msdos: reworked Makefile.GCC to get rid of need to duplicate source files
 msdos,win32: stop doing chdir when NOCWD_ASSUMPTIONS is defined
+tty: remove #define DEBUG that forced debug behavior in production builds
+tty: correctly handle an empty TERM environment variable
+tty: don't lose messages when ESC has canceled their display
+tty: clear topl after pickup_burden prompt
+tty: support terms where turning off inverse video turns off color too
+tty: object selection at --More-- prompt after '?' didn't work anymore
+unix: install recover command into GAMEDIR by default
 vms: prevent error() from indirectly triggering hangup save during forced exit
 
 
index 2dd0d571354c7fe895e11dd86112a26716728c0c..4350e5758f8f153e5473370ff104f35e99f4de5e 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)invent.c   3.4     2002/04/07      */
+/*     SCCS Id: @(#)invent.c   3.4     2002/09/16      */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -1677,6 +1677,7 @@ long* out_cnt;
                    ret = message_menu(lets[0],
                          want_reply ? PICK_ONE : PICK_NONE,
                          xprname(otmp, (char *)0, lets[0], TRUE, 0L, 0L));
+                   if (out_cnt) *out_cnt = -1L;        /* select all */
                    break;
                }
            }