diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index eda1542b672..612cb23545f 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -1025,7 +1025,7 @@ tok_nextc(struct tok_state *tok) else { tok->done = E_OK; tok->inp = strchr(tok->buf, '\0'); - done = tok->inp[-1] == '\n'; + done = tok->inp == tok->buf || tok->inp[-1] == '\n'; } } else {