diff options
-rw-r--r-- | video/dedicated_v.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/video/dedicated_v.c b/video/dedicated_v.c index 17fc33d57..4c827d913 100644 --- 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)); |