about summary refs log tree commit diff stats
path: root/miasm2/core/asmbloc.py
diff options
context:
space:
mode:
Diffstat (limited to 'miasm2/core/asmbloc.py')
-rw-r--r--miasm2/core/asmbloc.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/miasm2/core/asmbloc.py b/miasm2/core/asmbloc.py
index 7089e888..3517d452 100644
--- a/miasm2/core/asmbloc.py
+++ b/miasm2/core/asmbloc.py
@@ -166,8 +166,10 @@ class asm_bloc(object):
         return new_bloc
 
     def get_range(self):
+        """Returns the offset hull of an asm_bloc"""
         if len(self.lines):
-            return self.lines[0].offset, self.lines[-1].offset
+            return (self.lines[0].offset,
+                    self.lines[-1].offset + self.lines[-1].l)
         else:
             return 0, 0
 
@@ -544,7 +546,7 @@ def split_bloc(mnemo, attrib, pool_bin, blocs,
         a, b = cb.get_range()
 
         for off in bloc_dst:
-            if not (off > a and off <= b):
+            if not (off > a and off < b):
                 continue
             l = symbol_pool.getby_offset_create(off)
             new_b = cb.split(off, l)