This commit is contained in:
Benjamin Peterson 2016-09-18 23:44:02 -07:00
commit f5e8e8fc2b
1 changed files with 1 additions and 1 deletions

View File

@ -1025,7 +1025,7 @@ tok_nextc(struct tok_state *tok)
else { else {
tok->done = E_OK; tok->done = E_OK;
tok->inp = strchr(tok->buf, '\0'); tok->inp = strchr(tok->buf, '\0');
done = tok->inp[-1] == '\n'; done = tok->inp == tok->buf || tok->inp[-1] == '\n';
} }
} }
else { else {