From 11bfb09daaf827ea263c569a5707755dd9df1876 Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 17 Sep 2023 16:43:26 -0700 Subject: [PATCH] fix #4005 - paranoid_confirm:Autoall When paranoid confirmation for menustyle:full's "Autoselect all" is enabled, it is handling yes vs no backwards. The initial implementation had it right, then a negation got dropped when it was expanded to support yes|no via paranoid_confirm:Confirm. ESC is being treated as 'n' rather than as cancel. Fixing that will take some more work. This just adds the missing negation to make 'y' and 'n' behave properly. --- doc/fixes3-7-0.txt | 2 ++ src/pickup.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index c5e6d0adb..9312a4671 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1673,6 +1673,8 @@ using wizard mode #wizkill outside the endgame followed by m^V to enter the endgame without any intervening moves would result in impossible "dmonsfree: 0 removed doesn't match N pending on " dwarf/elf/orc/gnome hero killed by zombie would rise as human zombie for bones +paranoid_confirm:Autoall for menustyle:full has the test handling backward and + was treating 'yes' as no and 'n' or ESC as 'y' Fixes to 3.7.0-x Platform and/or Interface Problems Exposed Via git Repository diff --git a/src/pickup.c b/src/pickup.c index 98a254589..c73a696cb 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1364,8 +1364,8 @@ query_category( /* ParanoidAutoAll is set (otherwise verify_All is false); if ParanoidConfirm is also set, require "yes" rather than just "y" to accept (and "no" rather than "n" to decline) */ - if (paranoid_query(ParanoidConfirm, - "Really autoselect All?")) { + if (!paranoid_query(ParanoidConfirm, + "Really autoselect All?")) { /* answer is "no", so take 'A' out of the list; if it is the only entry, we'll return nothing, otherwise go on to next menu without autoselect */