diff options
author | Darkvater <darkvater@openttd.org> | 2005-05-02 17:58:11 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2005-05-02 17:58:11 +0000 |
commit | 4e1fbe54b2463a6d45022722e622f792cd64f09e (patch) | |
tree | ba105b4d665f76506caec95f528e9d6c34a69b1b | |
parent | 5a692014514f3108be2aed43a611d6e5b1c3b03d (diff) | |
download | openttd-4e1fbe54b2463a6d45022722e622f792cd64f09e.tar.xz |
(svn r2250) - Fix (regression): arguments with spaces in them were incorrectly parsed
-rw-r--r-- | console.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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; |