From baf451b216e2f7c741d727458f4b750b983585ed Mon Sep 17 00:00:00 2001 From: Darkvater Date: Sat, 21 Oct 2006 22:24:28 +0000 Subject: [PATCH] (svn r6875) -Feature: Allow for " to be in console tokens. Escape them with \. eg \". --- console.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/console.c b/console.c index 28b1238cc1..005c314282 100644 --- a/console.c +++ b/console.c @@ -1091,6 +1091,12 @@ void IConsoleCmdExec(const char *cmdstr) case '"': /* Tokens enclosed in "" are one token */ longtoken = !longtoken; break; + case '\\': /* Escape character for "" */ + if (cmdptr[1] == '"' && tstream_i + 1 < lengthof(tokenstream)) { + tokenstream[tstream_i++] = *++cmdptr; + break; + } + /* fallthrough */ default: /* Normal character */ tokenstream[tstream_i++] = *cmdptr;