about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--miasm2/core/sembuilder.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/miasm2/core/sembuilder.py b/miasm2/core/sembuilder.py
index 01b815e3..7592d158 100644
--- a/miasm2/core/sembuilder.py
+++ b/miasm2/core/sembuilder.py
@@ -123,7 +123,8 @@ class SemBuilder(object):
     @staticmethod
     def _create_labels():
         """Return the AST standing for label creations"""
-        out = ast.parse("lbl_end = ExprId(ir.get_next_instr(instr))").body
+        lbl_end = "lbl_end = ExprId(ir.get_next_label(instr), instr.mode)"
+        out = ast.parse(lbl_end).body
         out += ast.parse("lbl_if = ExprId(ir.gen_label())").body
         return out