gold in menus fix (tty; GOLDOBJ for branch, both GOLDOBJ/!GOLDOBJ for trunk)
A recent change to force gold in inventory (during multi-item Drop or
applying/looting containers) to have '$' for its inventory letter for the
!GOLDOBJ configuration has revealed a bug which 3.4.3 has for the GOLDOBJ
configuration. Specifying a count followed by '$' to use a subset of
carried gold didn't work under tty; the $ was treated as a group accelator
and overrode the count, so full stack was always used. (The code a few
lines above this which counts the occurrences of group accelators already
includes this same fix: ignore an item's group accelator when it matches
the selector.)
I wouldn't be surprised if other interfaces are subject to the same
problem; since I can't test those I'm not attempting to fix them blindly.
This commit is contained in:
@@ -299,6 +299,7 @@ Platform- and/or Interface-Specific Fixes
|
||||
tty: when loading user's run-time configuration, explicitly negating one of
|
||||
{DEC,IBM,MAC}graphics options after enabling another of them switched
|
||||
to regular ASCII and left the earlier option inaccurately set to "on"
|
||||
tty+GOLDOBJ: dropping or looting by menu wouldn't honor a count for gold
|
||||
unix: remove use of parentheses in nethack man page usage that confused a
|
||||
man page conversion tool
|
||||
unix,vms: allow digits after first character in name at "Who are you?" prompt
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)wintty.c 3.5 2006/12/11 */
|
||||
/* SCCS Id: @(#)wintty.c 3.5 2007/01/05 */
|
||||
/* Copyright (c) David Cohrs, 1991 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1227,7 +1227,8 @@ struct WinDesc *cw;
|
||||
|
||||
if (n > 0) /* at least one group accelerator found */
|
||||
for (rp = gacc, curr = cw->mlist; curr; curr = curr->next)
|
||||
if (curr->gselector && !index(gacc, curr->gselector) &&
|
||||
if (curr->gselector && curr->gselector != curr->selector &&
|
||||
!index(gacc, curr->gselector) &&
|
||||
(cw->how == PICK_ANY ||
|
||||
gcnt[GSELIDX(curr->gselector)] == 1)) {
|
||||
*rp++ = curr->gselector;
|
||||
|
||||
Reference in New Issue
Block a user