Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Handle erroneous end column offset gracefully.
  • Loading branch information
markshannon committed Jun 10, 2022
commit 2412451faf747183b892b16b2f9f3fdb16f997f8
2 changes: 1 addition & 1 deletion Python/compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -7748,7 +7748,7 @@ write_location_info_entry(struct assembler* a, struct instr* i, int isize)
}
}
else if (i->i_end_lineno == i->i_lineno) {
if (line_delta == 0 && column < 80 && end_column - column < 16) {
if (line_delta == 0 && column < 80 && end_column - column < 16 && end_column >= column) {
write_location_info_short_form(a, isize, column, end_column);
return 1;
}
Expand Down