From fbf51a0ae3a1126a82c9b418ad568b25d1d3315c Mon Sep 17 00:00:00 2001 From: Yiming Wang Date: Sat, 5 Jan 2019 02:09:28 +0800 Subject: [PATCH] Fix when offset like 47_0 --- uncompyle6/parsers/parse27.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uncompyle6/parsers/parse27.py b/uncompyle6/parsers/parse27.py index a290e94f..46b416db 100644 --- a/uncompyle6/parsers/parse27.py +++ b/uncompyle6/parsers/parse27.py @@ -233,7 +233,9 @@ class Python27Parser(Python2Parser): elif rule[0] in ('assert', 'assert2'): jump_inst = ast[1][0] jump_target = jump_inst.attr - return not (last >= len(tokens) or jump_target == tokens[last].offset) + return not (last >= len(tokens) + or jump_target == tokens[last].offset + or jump_target == next_offset(ast[-1].op, ast[-1].opc, ast[-1].offset)) elif rule == ('list_if_not', ('expr', 'jmp_true', 'list_iter')): jump_inst = ast[1][0] jump_offset = jump_inst.attr