diff options
author | Michael Droettboom <mdboom@gmail.com> | 2022-09-06 23:12:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-06 23:12:16 (GMT) |
commit | 05692c67c51b78a5a5a7bb61d646519025e38015 (patch) | |
tree | 1fe2f031c0d77bcfdd09d1acb20a752d176f8047 /Parser/tokenizer.c | |
parent | 67444902a0f10419a557d0a2d3b8675c31b075a9 (diff) | |
download | cpython-05692c67c51b78a5a5a7bb61d646519025e38015.zip cpython-05692c67c51b78a5a5a7bb61d646519025e38015.tar.gz cpython-05692c67c51b78a5a5a7bb61d646519025e38015.tar.bz2 |
gh-96611: Fix error message for invalid UTF-8 in mid-multiline string (#96623)
Diffstat (limited to 'Parser/tokenizer.c')
-rw-r--r-- | Parser/tokenizer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index f2606f1..6d08db5 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -1936,6 +1936,8 @@ tok_get(struct tok_state *tok, const char **p_start, const char **p_end) /* Get rest of string */ while (end_quote_size != quote_size) { c = tok_nextc(tok); + if (tok->done == E_DECODE) + break; if (c == EOF || (quote_size == 1 && c == '\n')) { assert(tok->multi_line_start != NULL); // shift the tok_state's location into |