From: Pasi Kallinen Date: Sun, 28 Aug 2022 11:09:06 +0000 (+0300) Subject: Fix hang when getting an input prompt X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b4c45a4b8e9f589e7dc542e1de0cf5dac0bc1eff;p=nethack Fix hang when getting an input prompt When you were busy with an occupation, such as digging with a pickaxe, and a prompt showed up to ask you enter something, the game just hung with infinite loop. Remove the occupation check returning a NUL from the input function. I didn't notice any side effects, but I would not be surprised if something comes up ... I didn't investigate which commit caused this, but I suspect my rhack or parse changes. --- diff --git a/src/cmd.c b/src/cmd.c index 5ef058fa3..44009c104 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -457,8 +457,6 @@ pgetchar(void) /* courtesy of aeb@cwi.nl */ { register int ch = '\0'; - if (g.occupation) - return '\0'; if (iflags.debug_fuzzer) return randomkey(); ch = nhgetch();