diff options
-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); |