diff options
author | wm4 <wm4@nowhere> | 2014-10-31 23:53:39 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-10-31 23:56:17 +0100 |
commit | 75afef64638485aa982519cee21a7b55e2b90a28 (patch) | |
tree | 04252bb5aa03854f4a8c2b5ce789230f43cad563 | |
parent | 13d408fe8ded849375667de28516bdba28a83be9 (diff) | |
download | mpv-75afef64638485aa982519cee21a7b55e2b90a28.tar.bz2 mpv-75afef64638485aa982519cee21a7b55e2b90a28.tar.xz |
command: don't require whitespace before ';' or '#'
This change is probably too simplistic, but most things appear to work,
so I don't care about that now.
Fixes #1232.
-rw-r--r-- | input/cmd_parse.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/input/cmd_parse.c b/input/cmd_parse.c index 6f60c0c081..7fdce93901 100644 --- a/input/cmd_parse.c +++ b/input/cmd_parse.c @@ -197,10 +197,7 @@ error: static bool read_token(bstr str, bstr *out_rest, bstr *out_token) { bstr t = bstr_lstrip(str); - char nextc = t.len > 0 ? t.start[0] : 0; - if (nextc == '#' || nextc == ';') - return false; // comment or command separator - int next = bstrcspn(t, WHITESPACE); + int next = bstrcspn(t, WHITESPACE "#;"); if (!next) return false; *out_token = bstr_splice(t, 0, next); |