summaryrefslogtreecommitdiff
path: root/video
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-10-19 09:39:29 +0000
committerpeter1138 <peter1138@openttd.org>2006-10-19 09:39:29 +0000
commit925c61202cbe1741eb1d4af1768143b1742845e4 (patch)
treec25485005e8dcf2ce1bdbaf5471c0fd5192be9a1 /video
parente6004ad4a600c082b89845bbd9bda319de28c4ab (diff)
downloadopenttd-925c61202cbe1741eb1d4af1768143b1742845e4.tar.xz
(svn r6835) - Fix: Pressing ^D (EOF) at a dedicated console caused it to repeat the last command, instead of doing nothing.
Diffstat (limited to 'video')
-rw-r--r--video/dedicated_v.c2
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));