# HG changeset patch # User peter1138 # Date 2006-10-19 09:39:29 # Node ID 548da56c10b9efb706e4c3d220205fd84218519a # Parent 68a16fe574e10473cfee39fcc9ae5c944ff8f10f (svn r6835) - Fix: Pressing ^D (EOF) at a dedicated console caused it to repeat the last command, instead of doing nothing. diff --git a/video/dedicated_v.c b/video/dedicated_v.c --- a/video/dedicated_v.c +++ b/video/dedicated_v.c @@ -195,7 +195,7 @@ static void DedicatedHandleKeyInput(void if (_exit_game) return; #if defined(UNIX) || defined(__OS2__) - fgets(input_line, lengthof(input_line), stdin); + if (fgets(input_line, lengthof(input_line), stdin) == NULL) return; #else /* Handle console input, and singal console thread, it can accept input again */ strncpy(input_line, _win_console_thread_buffer, lengthof(input_line));