]> granicus.if.org Git - nethack/commitdiff
Fix: 'A'+'P' regression when dropping by type
authorMichael Meyer <me@entrez.cc>
Thu, 9 Feb 2023 19:40:52 +0000 (14:40 -0500)
committerPatR <rankin@nethack.org>
Thu, 9 Feb 2023 23:34:09 +0000 (15:34 -0800)
Selecting both 'P' (the just-picked-up items category) and 'A' (the
'auto-select relevant items' flag) when dropping items by type with 'D'
was automatically dropping every item in inventory instead of only items
that were marked as just having been picked up.  Basically, it was
causing 'A' to act like it did before b65c93c amended its functionality.

This commit is more-or-less identical to 991e739, both in terms of the
problem and the fix, except that it applies to dropping items instead of
looting.

src/do.c

index b6aae4ce54d62e0ccd92bf58e37571294e5a8bc6..29418b56866cbea570e23a75cdd604b283190729 100644 (file)
--- a/src/do.c
+++ b/src/do.c
@@ -924,6 +924,7 @@ menu_drop(int retry)
             } else if (pick_list[i].item.a_int == 'P') {
                 justpicked_quan = max(0, pick_list[i].count);
                 drop_justpicked = TRUE;
+                drop_everything = FALSE;
                 add_valid_menu_class(pick_list[i].item.a_int);
             } else {
                 add_valid_menu_class(pick_list[i].item.a_int);