diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index 1540d26d8b3..1a8cf40c2ce 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -1014,7 +1014,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 {