From 6fb0c8a82e110f3b9ca83822b3864a2929f749fe Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 21 Mar 2022 18:33:34 -0700 Subject: [PATCH] cancelled #herecmd using time I managed to execute #herecmd by mistake and when I typed ESC to get out of its menu, monsters took their next turn. #therecmd behaved similarly. --- src/cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd.c b/src/cmd.c index 170019f6c..d5a6d642d 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -4395,7 +4395,7 @@ doherecmdmenu(void) { char ch = here_cmd_menu(TRUE); - return ch ? ECMD_TIME : ECMD_OK; + return (ch && ch != '\033') ? ECMD_TIME : ECMD_OK; } /* #therecmdmenu command, a way to test there_cmd_menu without mouse */ @@ -4412,7 +4412,7 @@ dotherecmdmenu(void) else ch = here_cmd_menu(TRUE); - return ch ? ECMD_TIME : ECMD_OK; + return (ch && ch != '\033') ? ECMD_TIME : ECMD_OK; } static void -- 2.50.1