From 4e1fbe54b2463a6d45022722e622f792cd64f09e Mon Sep 17 00:00:00 2001 From: Darkvater Date: Mon, 2 May 2005 17:58:11 +0000 Subject: (svn r2250) - Fix (regression): arguments with spaces in them were incorrectly parsed --- console.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/console.c b/console.c index 7555c9f62..9be86614e 100644 --- a/console.c +++ b/console.c @@ -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; -- cgit v1.2.3-70-g09d2