fix a couple of brainos that broke quotes entirely

This commit is contained in:
Bill Currie 2002-03-21 21:45:00 +00:00
parent c1deee9955
commit 619a77b2f7

View file

@ -1110,11 +1110,11 @@ Cmd_TokenizeString (const char *text, qboolean filter)
cmd_activebuffer->args[cmd_argc - 1] = strlen (cmd_activebuffer->line->str); cmd_activebuffer->args[cmd_argc - 1] = strlen (cmd_activebuffer->line->str);
if ((str[i] == '\'' && str[i + len] == '\'') if ((str[i] == '\'' && str[i + len] == '\'')
|| (str[i] == '"' && str[i + len] == '"')) { || (str[i] == '"' && str[i + len] == '"')) {
dstring_appendsubstr (cmd_activebuffer->line, str + i, 1);
dstring_appendsubstr (cmd_activebuffer->line, str + i, 1);
i++; i++;
len -= 1; len -= 1;
quotes = 1; quotes = 1;
dstring_appendsubstr (cmd_activebuffer->line, str + i, 1);
dstring_appendsubstr (cmd_activebuffer->line, str + i, 1);
} }
if (str[i] == '{' && str[i + len] == '}') { if (str[i] == '{' && str[i + len] == '}') {
i++; i++;
@ -1149,8 +1149,7 @@ Cmd_TokenizeString (const char *text, qboolean filter)
} }
dstring_insertstr (cmd_activebuffer->line, dstring_insertstr (cmd_activebuffer->line,
cmd_activebuffer->argv[cmd_argc - 1]->str, cmd_activebuffer->argv[cmd_argc - 1]->str,
strlen (cmd_activebuffer->line->str) - 2 * quotes); strlen (cmd_activebuffer->line->str) - quotes);
i += len + quotes + braces; /* If we ended on a quote or brace, i += len + quotes + braces; /* If we ended on a quote or brace,
skip it */ skip it */
} }