You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Remember rocky: use off2int() in offset testing!
This commit is contained in:
@@ -664,7 +664,7 @@ class Python2Parser(PythonParser):
|
||||
elif lhs == "assert_expr_and":
|
||||
jmp_false = ast[1]
|
||||
jump_target = jmp_false[0].attr
|
||||
return jump_target > tokens[last].offset
|
||||
return jump_target > tokens[last].off2int()
|
||||
elif lhs in ("raise_stmt1",):
|
||||
# We will assume 'LOAD_ASSERT' will be handled by an assert grammar rule
|
||||
return tokens[first] == "LOAD_ASSERT" and (last >= len(tokens))
|
||||
|
Reference in New Issue
Block a user