Skip to content

Commit cb60a16

Browse files
committed
gh-145234: keep tokenizer source pointer after UTF-8 translation
1 parent 6545f1f commit cb60a16

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Parser/tokenizer/string_tokenizer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ decode_str(const char *input, int single, struct tok_state *tok, int preserve_cr
120120
str = translated;
121121
Py_CLEAR(utf8);
122122
}
123+
tok->str = str;
123124
assert(tok->decoding_buffer == NULL);
124125
tok->decoding_buffer = utf8; /* CAUTION */
125126
return str;

0 commit comments

Comments
 (0)