(svn r2250) - Fix (regression): arguments with spaces in them were incorrectly parsed

This commit is contained in:
Darkvater 2005-05-02 17:58:11 +00:00
parent 5a69201451
commit 4e1fbe54b2
1 changed files with 6 additions and 2 deletions

View File

@ -1045,10 +1045,14 @@ void IConsoleCmdExec(const char *cmdstr)
case ' ': /* Token seperator */
if (!foundtoken) break;
tokenstream[tstream_i] = (longtoken) ? *cmdptr : '\0';
if (longtoken) {
tokenstream[tstream_i] = *cmdptr;
} else {
tokenstream[tstream_i] = '\0';
foundtoken = false;
}
tstream_i++;
foundtoken = false;
break;
case '"': /* Tokens enclosed in "" are one token */
longtoken = !longtoken;