We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09b90a0 commit 92a02c1Copy full SHA for 92a02c1
Parser/tokenizer.c
@@ -813,6 +813,9 @@ tok_readline_raw(struct tok_state *tok)
813
tok_concatenate_interactive_new_line(tok, line) == -1) {
814
return 0;
815
}
816
+ if (*tok->inp == '\0') {
817
+ return 0;
818
+ }
819
tok->inp = strchr(tok->inp, '\0');
820
} while (tok->inp[-1] != '\n');
821
return 1;
@@ -963,7 +966,7 @@ tok_underflow_file(struct tok_state *tok) {
963
966
if (tok->lineno > 2) {
964
967
tok->decoding_state = STATE_NORMAL;
965
968
- else if (!check_coding_spec(tok->cur, tok->end - tok->cur,
969
+ else if (!check_coding_spec(tok->cur, strlen(tok->cur),
970
tok, fp_setreadl))
971
{
972
0 commit comments