]> granicus.if.org Git - nethack/commitdiff
Fix hang when getting an input prompt
authorPasi Kallinen <paxed@alt.org>
Sun, 28 Aug 2022 11:09:06 +0000 (14:09 +0300)
committerPasi Kallinen <paxed@alt.org>
Sun, 28 Aug 2022 11:09:09 +0000 (14:09 +0300)
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.

src/cmd.c

index 5ef058fa3345c0b89d9e4a22fc270eaeb270040d..44009c1045b6080a222d50a0293ad2558e0761b1 100644 (file)
--- 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();