(svn r1883) -Fix: [1109400] Better test if a string actually contains any console command

This commit is contained in:
tron
2005-02-17 17:38:17 +00:00
parent 56a8302642
commit 513eb4d7bb
2 changed files with 11 additions and 5 deletions

View File

@@ -1094,8 +1094,16 @@ void IConsoleCmdExec(const char* cmdstr)
uint i;
uint l;
if (strlen(cmdstr) == 0) // only execute if there is something typed obviously
return;
for (; strchr("\n\r \t", *cmdstr) != NULL; ++cmdstr) {
switch (*cmdstr) {
case '\0':
case '#':
return;
default:
break;
}
}
if (_stdlib_con_developer)
IConsolePrintF(_iconsole_color_debug, "CONDEBUG: execution_cmdline: %s", cmdstr);