about summary refs log tree commit diff stats
path: root/miasm2/core/cpu.py
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2018-08-24 18:22:41 +0200
committerGitHub <noreply@github.com>2018-08-24 18:22:41 +0200
commit7a87d94ca4e8b8df8e91f444087b594616cbc689 (patch)
treeb7defae06be1db3a2935f2b9247c4f6b908b39c9 /miasm2/core/cpu.py
parent68ffd93563d885102d31b7023c0ee62f85df7146 (diff)
parent4c2224a784c15784597624fadd6d9a5dae7d37a2 (diff)
downloadmiasm-7a87d94ca4e8b8df8e91f444087b594616cbc689.tar.gz
miasm-7a87d94ca4e8b8df8e91f444087b594616cbc689.zip
Merge pull request #831 from serpilliere/fix_asm_parse
Core: fix asm int
Diffstat (limited to 'miasm2/core/cpu.py')
-rw-r--r--miasm2/core/cpu.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/miasm2/core/cpu.py b/miasm2/core/cpu.py
index 686e12ba..8491c5c8 100644
--- a/miasm2/core/cpu.py
+++ b/miasm2/core/cpu.py
@@ -1030,6 +1030,10 @@ class instruction(object):
                 if '_' in names:
                     fixed_expr[exprloc] = self.get_asm_next_offset(exprloc)
                     continue
+                arg_int = symbols.get_location_offset(loc_key)
+                if arg_int is not None:
+                    fixed_expr[exprloc] = m2_expr.ExprInt(arg_int, exprloc.size)
+                    continue
                 if not names:
                     raise ValueError('Unresolved symbol: %r' % exprloc)