diff options
author | Pablo Galindo Salgado <Pablogsal@gmail.com> | 2023-12-11 11:44:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-11 11:44:22 (GMT) |
commit | a135a6d2c6d503b186695f01efa7eed65611b04e (patch) | |
tree | 29f178c34c1e763f84ecb3b63be7c5024c4f51e2 /Python/Python-tokenize.c | |
parent | 4c5b9c107a1d158b245f21a1839a2bec97d05383 (diff) | |
download | cpython-a135a6d2c6d503b186695f01efa7eed65611b04e.zip cpython-a135a6d2c6d503b186695f01efa7eed65611b04e.tar.gz cpython-a135a6d2c6d503b186695f01efa7eed65611b04e.tar.bz2 |
gh-112943: Correctly compute end offsets for multiline tokens in the tokenize module (#112949)
Diffstat (limited to 'Python/Python-tokenize.c')
-rw-r--r-- | Python/Python-tokenize.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/Python-tokenize.c b/Python/Python-tokenize.c index 364fe55..a789170 100644 --- a/Python/Python-tokenize.c +++ b/Python/Python-tokenize.c @@ -225,7 +225,7 @@ tokenizeriter_next(tokenizeriterobject *it) col_offset = _PyPegen_byte_offset_to_character_offset(line, token.start - line_start); } if (token.end != NULL && token.end >= it->tok->line_start) { - end_col_offset = _PyPegen_byte_offset_to_character_offset(line, token.end - it->tok->line_start); + end_col_offset = _PyPegen_byte_offset_to_character_offset_raw(it->tok->line_start, token.end - it->tok->line_start); } if (it->tok->tok_extra_tokens) { |