mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-27 17:32:06 +00:00
(svn r2250) - Fix (regression): arguments with spaces in them were incorrectly parsed
This commit is contained in:
parent
5a69201451
commit
4e1fbe54b2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user