diff --git a/test/test_expressions.py b/test/test_expressions.py index 43e04362..5a4a8b80 100755 --- a/test/test_expressions.py +++ b/test/test_expressions.py @@ -3,3 +3,8 @@ def _lsbStrToInt(str): (ord(str[1]) << 8) + \ (ord(str[2]) << 16) + \ (ord(str[3]) << 24) + +def test(x): + return x + +test(a == b == c == 1) \ No newline at end of file diff --git a/test/test_functions.py b/test/test_functions.py index 7dc60b56..bf774a13 100755 --- a/test/test_functions.py +++ b/test/test_functions.py @@ -50,4 +50,9 @@ def func_with_tuple_args6((a,b), (c,d)=(2,3), *args, **kwargs): print c def func_ret1(): - return 1 < 2 < 3 \ No newline at end of file + return 1 < 2 < 3 + +def read(size=0): + if size > 0 and size <= x - cur: + return 0 + return 0 \ No newline at end of file diff --git a/uncompyle2/scanner25.py b/uncompyle2/scanner25.py index 0ecb200e..7f20eed4 100755 --- a/uncompyle2/scanner25.py +++ b/uncompyle2/scanner25.py @@ -777,6 +777,9 @@ class Scanner25(scan.Scanner): last_jump_good = False self.fixed_jumps[pos] = fix or match[-1] return + elif pos < rtarget and code[target] == ROT_TWO: + self.fixed_jumps[pos] = target + return else: self.fixed_jumps[pos] = match[-1] return diff --git a/uncompyle2/scanner26.py b/uncompyle2/scanner26.py index 7b87e5db..408d9b6d 100755 --- a/uncompyle2/scanner26.py +++ b/uncompyle2/scanner26.py @@ -776,6 +776,9 @@ class Scanner26(scan.Scanner): last_jump_good = False self.fixed_jumps[pos] = fix or match[-1] return + elif pos < rtarget and code[target] == ROT_TWO: + self.fixed_jumps[pos] = target + return else: self.fixed_jumps[pos] = match[-1] return