mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r6875) -Feature: Allow for " to be in console tokens. Escape them with \. eg \".
This commit is contained in:
parent
6a955f3892
commit
baf451b216
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue