Kaydet (Commit) 274a7632 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

properly handle the single null-byte file (closes #24022)

üst b00cc839
......@@ -951,7 +951,7 @@ tok_nextc(register 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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment