summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-09-15 01:44:56 +0200
committerwm4 <wm4@nowhere>2012-09-23 14:57:41 +0200
commitf360f492d6c73197890eeb86759d417b23b52452 (patch)
tree99dc11b0c8a1a57ba2e0a5aba826f3fe773db9d0 /input
parent85a64b76ccb48c53e5ffca719455f5d623a888a0 (diff)
downloadmpv-f360f492d6c73197890eeb86759d417b23b52452.tar.bz2
mpv-f360f492d6c73197890eeb86759d417b23b52452.tar.xz
commands: fix parsing bug
When tabs are used as whitespace between command and the first string parameter, the string is not correctly terminated.
Diffstat (limited to 'input')
-rw-r--r--input/input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/input/input.c b/input/input.c
index 7f9021e35b..54be75c439 100644
--- a/input/input.c
+++ b/input/input.c
@@ -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++;