Regularly check for user input when searching, to have a chance to catch EOF from...
[gnushogi.git] / gnushogi / commondsp.c
index 31dc80e..1f39b78 100644 (file)
@@ -1745,8 +1745,8 @@ InputCommand(char *command)
             {
                 s[0] = sx[0] = '\0';
 
-                while(!sx[0])
-                    (void)fgets(sx, 80, stdin);
+                while(!eof && !sx[0])
+                    eof = (fgets(sx, 80, stdin) == NULL);
             }
             else
             {