From fab5d2dfa23c30c083ae3c5738c8c0b7832b18cc Mon Sep 17 00:00:00 2001 From: Ajax Date: Thu, 15 Feb 2018 12:53:29 +0100 Subject: simp_compose: ensure the '/' is not rounded to 0, but really equals to --- miasm2/expression/simplifications_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'miasm2/expression/simplifications_common.py') diff --git a/miasm2/expression/simplifications_common.py b/miasm2/expression/simplifications_common.py index ccb97cb3..d1b134f2 100644 --- a/miasm2/expression/simplifications_common.py +++ b/miasm2/expression/simplifications_common.py @@ -539,7 +539,7 @@ def simp_compose(e_s, expr): nxt = args[i + 1] if arg.is_mem() and nxt.is_mem(): gap = e_s(nxt.arg - arg.arg) - if gap.is_int() and int(gap) == arg.size / 8: + if gap.is_int() and arg.size % 8 == 0 and int(gap) == arg.size / 8: args = args[:i] + [ExprMem(arg.arg, arg.size + nxt.size)] + args[i + 2:] return ExprCompose(*args) -- cgit 1.4.1