From d09e820d89b2d1f637a8704a0b9f24087b1d167f Mon Sep 17 00:00:00 2001 From: rocky Date: Sun, 25 Feb 2018 23:02:23 -0500 Subject: [PATCH] Use get_inst() to paper around EXTENDED_ARG --- test/test_pyenvlib.py | 1 + uncompyle6/scanners/scanner3.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_pyenvlib.py b/test/test_pyenvlib.py index 6fa181e5..d7d46f66 100755 --- a/test/test_pyenvlib.py +++ b/test/test_pyenvlib.py @@ -9,6 +9,7 @@ Usage-Examples: test_pyenvlib.py --all --verify # decomyile all tests and verify results test_pyenvlib.py --test # decompile only the testsuite test_pyenvlib.py --2.7.12 --verify # decompile and verify python lib 2.7.11 + test_pyenvlib.py --3.6.4 --max 10 # decompile first 10 of 3.6.4 Adding own test-trees: diff --git a/uncompyle6/scanners/scanner3.py b/uncompyle6/scanners/scanner3.py index 4d2c9d4c..847af1be 100644 --- a/uncompyle6/scanners/scanner3.py +++ b/uncompyle6/scanners/scanner3.py @@ -790,7 +790,7 @@ class Scanner3(Scanner): # not myself? If so, it's part of a larger conditional. # rocky: if we have a conditional jump to the next instruction, then # possibly I am "skipping over" a "pass" or null statement. - pretarget = self.insts[self.offset2inst_index[prev_op[target]]] + pretarget = self.get_inst(prev_op[target]) if (pretarget.opcode in self.pop_jump_if_pop and (target > offset) and pretarget.offset != offset):