From ed64e7b4436f83c3fd5234d4b527df83fe936f88 Mon Sep 17 00:00:00 2001 From: rocky Date: Wed, 22 Jan 2020 07:07:57 -0500 Subject: [PATCH] Check that the jumps to jump fix jumps to a *jump* --- uncompyle6/scanners/scanner37base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uncompyle6/scanners/scanner37base.py b/uncompyle6/scanners/scanner37base.py index 0b0d32e9..a51b3fa9 100644 --- a/uncompyle6/scanners/scanner37base.py +++ b/uncompyle6/scanners/scanner37base.py @@ -1,4 +1,4 @@ -# Copyright (c) 2015-2019 by Rocky Bernstein +# Copyright (c) 2015-2020 by Rocky Bernstein # Copyright (c) 2005 by Dan Pascu # Copyright (c) 2000-2002 by hartmut Goebel # @@ -266,7 +266,7 @@ class Scanner37Base(Scanner): # "extended arg" backward jump to the same location. if inst.opname == "JUMP_FORWARD": jump_inst = self.insts[self.offset2inst_index[inst.argval]] - if jump_inst.has_extended_arg: + if jump_inst.has_extended_arg and jump_inst.opname.startswith("JUMP"): # Create comination of the jump-to instruction and # this one. Keep the position information of this instruction, # but the operator and operand properties come from the other