(svn r6875) -Feature: Allow for " to be in console tokens. Escape them with \. eg \".

This commit is contained in:
Darkvater 2006-10-21 22:24:28 +00:00
parent 6a955f3892
commit baf451b216
1 changed files with 6 additions and 0 deletions

View File

@ -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;