]> granicus.if.org Git - nethack/commitdiff
more inventory selection
authorcohrs <cohrs>
Tue, 5 Feb 2002 03:08:36 +0000 (03:08 +0000)
committercohrs <cohrs>
Tue, 5 Feb 2002 03:08:36 +0000 (03:08 +0000)
the !allowcnt case wasn't being handled correctly, cuasing counts to
be set to 0 inappropriately.

src/invent.c

index c88ae6cb36e63e1d9afd3512fe5b031a2e333734..cf279e61513911497a813034116649562cdd590e 100644 (file)
@@ -945,7 +945,7 @@ register const char *let,*word;
                    ilet = display_pickinv(allowed_choices, TRUE,
                                           allowcnt ? &ctmp : (long *)0);
                    if(!ilet) continue;
-                   if (ctmp >= 0) {
+                   if (allowcnt && ctmp >= 0) {
                        cnt = ctmp;
                        if (!cnt) prezero = TRUE;
                        allowcnt = 2;