about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorserpilliere <fabrice.desclaux@cea.fr>2015-03-14 16:55:54 +0100
committerserpilliere <fabrice.desclaux@cea.fr>2015-03-14 17:00:55 +0100
commitbeca56ef3c51e11880cafed28be75a704c795b89 (patch)
tree1d41e392c8fafa9b12f9303b5a9354afbdb7f64c
parent1975191b80612098855707f984dba1f712ed02b8 (diff)
downloadmiasm-beca56ef3c51e11880cafed28be75a704c795b89.tar.gz
miasm-beca56ef3c51e11880cafed28be75a704c795b89.zip
CPU: fix binary output for instruction with prefix
-rw-r--r--miasm2/core/cpu.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/miasm2/core/cpu.py b/miasm2/core/cpu.py
index f8fdb4ff..e81c0daa 100644
--- a/miasm2/core/cpu.py
+++ b/miasm2/core/cpu.py
@@ -1164,7 +1164,7 @@ class cls_mn(object):
                 a.expr = expr_simp(a.expr)
 
             c.l = prefix_len + total_l / 8
-            c.b = cls.getbytes(bs, offset, total_l / 8)
+            c.b = cls.getbytes(bs, offset_o, c.l)
             c.offset = offset_o
             c = c.post_dis()
             if c is None:
@@ -1173,7 +1173,7 @@ class cls_mn(object):
             instr = cls.instruction(c.name, mode, c_args,
                                     additional_info=c.additional_info())
             instr.l = prefix_len + total_l / 8
-            instr.b = cls.getbytes(bs, offset, total_l / 8)
+            instr.b = cls.getbytes(bs, offset_o, instr.l)
             instr.offset = offset_o
             instr.get_info(c)
             if c.alias: