about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2020-06-01 15:41:34 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2020-06-01 16:22:59 +0200
commitaed83b91e76a464e109d66632945e34ab81d2c85 (patch)
tree09d1c3bc878bda4800cc34749f27de57fd031260
parent1ad1ad398eed664c706bf109416ea1bbf111e835 (diff)
downloadfocaccia-miasm-aed83b91e76a464e109d66632945e34ab81d2c85.tar.gz
focaccia-miasm-aed83b91e76a464e109d66632945e34ab81d2c85.zip
Fix ExprOp(+ with one arg
-rw-r--r--miasm/arch/x86/arch.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/miasm/arch/x86/arch.py b/miasm/arch/x86/arch.py
index 8263aca6..127dded4 100644
--- a/miasm/arch/x86/arch.py
+++ b/miasm/arch/x86/arch.py
@@ -1913,7 +1913,10 @@ def modrm2expr(modrm, parent, w8, sx=0, xmm=0, mm=0, bnd=0):
         if parent.disp.value is None:
             return None
         o.append(ExprInt(int(parent.disp.expr), admode))
-    expr = ExprOp('+', *o)
+    if len(o) == 1:
+        expr = o[0]
+    else:
+        expr = ExprOp('+', *o)
     if w8 == 0:
         opmode = 8
     elif sx == 1: