From 0ecb0547e6f2fc317bcf17bec484758124e6198a Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 28 Sep 2023 18:19:49 +0300 Subject: [PATCH] Reset getdir_click when exiting therecmdmenu early This was causing a really annoying to track down bug where the fuzzer threw the attached iron ball and it could end up anywhere on the level, emitting a sanity check error. --- src/cmd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cmd.c b/src/cmd.c index 62311f445..ffc675724 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -5604,6 +5604,7 @@ dotherecmdmenu(void) else ch = there_cmd_menu(x, y, iflags.getdir_click); gc.clicklook_cc.x = gc.clicklook_cc.y = -1; + iflags.getdir_click = 0; return (ch && ch != '\033') ? ECMD_TIME : ECMD_OK; }