commands: fix parsing bug

When tabs are used as whitespace between command and the first string
parameter, the string is not correctly terminated.
This commit is contained in:
wm4 2012-09-15 01:44:56 +02:00
parent 85a64b76cc
commit f360f492d6
1 changed files with 1 additions and 1 deletions

View File

@ -794,7 +794,7 @@ mp_cmd_t *mp_input_parse_cmd(char *str)
"unterminated.\n", cmd_def->name, i + 1);
goto error;
}
if (*ptr == term)
if (*ptr == term || (*ptr == '\t' && term == ' '))
break;
if (*ptr == '\\')
ptr++;