diff options
| author | Ajax <commial@gmail.com> | 2018-02-15 12:53:29 +0100 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2018-02-15 15:03:27 +0100 |
| commit | fab5d2dfa23c30c083ae3c5738c8c0b7832b18cc (patch) | |
| tree | d8d893f1fcc292533b39aad20664cb89b2a565aa /miasm2/expression/simplifications_common.py | |
| parent | 9dd075f09e4f31ec7fe12e50709d9e58c65ed5f4 (diff) | |
| download | miasm-fab5d2dfa23c30c083ae3c5738c8c0b7832b18cc.tar.gz miasm-fab5d2dfa23c30c083ae3c5738c8c0b7832b18cc.zip | |
simp_compose: ensure the '/' is not rounded to 0, but really equals to
Diffstat (limited to 'miasm2/expression/simplifications_common.py')
| -rw-r--r-- | miasm2/expression/simplifications_common.py | 2 |
1 files changed, 1 insertions, 1 deletions
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) |