summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-12-15 21:30:20 +0000
committerdarkvater <darkvater@openttd.org>2004-12-15 21:30:20 +0000
commitce4bff7fa5933968f577eca7fab0990df732eb54 (patch)
treec96682514999dcdeb76dfd1234250c9f82157561
parent39b3e71239ed5a8758f9fc34a444a2cdbbbc4468 (diff)
downloadopenttd-ce4bff7fa5933968f577eca7fab0990df732eb54.tar.xz
(svn r1110) -Fix: Empty console commands were executed and returned error message (sign_de for GeniusDex)
-rw-r--r--console.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/console.c b/console.c
index 0fd2bc39d..02eb653a3 100644
--- a/console.c
+++ b/console.c
@@ -193,7 +193,9 @@ static void IConsoleWndProc(Window* w, WindowEvent* e)
IConsolePrintF(_iconsole_color_commands, "] %s", _iconsole_cmdline);
_iconsole_cmdbufferpos = 19;
IConsoleCmdBufferAdd(_iconsole_cmdline);
- IConsoleCmdExec(_iconsole_cmdline);
+ if (strlen(_iconsole_cmdline) != 0) // only execute if there is something typed obviously
+ IConsoleCmdExec(_iconsole_cmdline);
+
IConsoleClearCommand();
break;
case WKC_CTRL | WKC_RETURN: