Bugs in 2.x relative import '.' and 1.x bytecode

This commit is contained in:
rocky
2022-05-14 17:42:30 -04:00
parent 021810bb2c
commit 656a9aa290
4 changed files with 20 additions and 5 deletions

View File

@@ -113,7 +113,7 @@ class Scanner26(scan.Scanner2):
i = self.next_stmt[last_stmt]
replace = {}
while i < codelen - 1:
if self.lines[last_stmt].next > i:
if self.lines and self.lines[last_stmt].next > i:
# Distinguish "print ..." from "print ...,"
if self.code[last_stmt] == self.opc.PRINT_ITEM:
if self.code[i] == self.opc.PRINT_ITEM: