From 925c61202cbe1741eb1d4af1768143b1742845e4 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Thu, 19 Oct 2006 09:39:29 +0000 Subject: (svn r6835) - Fix: Pressing ^D (EOF) at a dedicated console caused it to repeat the last command, instead of doing nothing. --- video/dedicated_v.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/dedicated_v.c') 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)); -- cgit v1.2.3-70-g09d2