about summary refs log tree commit diff stats
path: root/miasm2/ir/translators/python.py
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2016-11-07 12:24:51 +0100
committerGitHub <noreply@github.com>2016-11-07 12:24:51 +0100
commit3af8c4a5a6668cc89a4df3fb66222f4147a896b9 (patch)
tree21a7d7ad5d6da120e8e23e0b92725073d4d4e27c /miasm2/ir/translators/python.py
parenta15e0faca425c6e2591448e510bf14f1c3f04e14 (diff)
parentf0fbc59a663774dc4f4861308bee3f91ccd9746d (diff)
downloadmiasm-3af8c4a5a6668cc89a4df3fb66222f4147a896b9.tar.gz
miasm-3af8c4a5a6668cc89a4df3fb66222f4147a896b9.zip
Merge pull request #445 from serpilliere/symb_exec_clean
Symb exec clean
Diffstat (limited to '')
-rw-r--r--miasm2/ir/translators/python.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/miasm2/ir/translators/python.py b/miasm2/ir/translators/python.py
index f745d2df..c06d865c 100644
--- a/miasm2/ir/translators/python.py
+++ b/miasm2/ir/translators/python.py
@@ -31,10 +31,10 @@ class TranslatorPython(Translator):
 
     def from_ExprCompose(self, expr):
         out = []
-        for subexpr, start, stop in expr.args:
-            out.append("((%s & 0x%x) << %d)" % (self.from_expr(subexpr),
-                                                 (1 << (stop - start)) - 1,
-                                                 start))
+        for index, arg in expr.iter_args():
+            out.append("((%s & 0x%x) << %d)" % (self.from_expr(arg),
+                                                 (1 << arg.size) - 1,
+                                                 index))
         return "(%s)" % ' | '.join(out)
 
     def from_ExprCond(self, expr):