fix B12001 - ?--More--single line menu
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user