summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2018-02-27 19:44:03 -0500
committerPeter LaFosse <peter@vector35.com>2018-03-23 17:10:06 -0400
commiteb61be6398bb630e1731b91a440a61d24d62be24 (patch)
treee09fac60d6b6e76ae8964af9a74c3e7949f7da3a /python
parent1f90dae1d3ba958041862d39fff74e0dcdd9cf63 (diff)
Fix lifted IL access from Python
Diffstat (limited to 'python')
-rw-r--r--python/lowlevelil.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/python/lowlevelil.py b/python/lowlevelil.py
index bf7d6d46..ab6170a5 100644
--- a/python/lowlevelil.py
+++ b/python/lowlevelil.py
@@ -264,7 +264,7 @@ class LowLevelILInstruction(object):
LowLevelILOperation.LLIL_NORET: [],
LowLevelILOperation.LLIL_IF: [("condition", "expr"), ("true", "int"), ("false", "int")],
LowLevelILOperation.LLIL_GOTO: [("dest", "int")],
- LowLevelILOperation.LLIL_FLAG_COND: [("condition", "cond", "semantic_class", "sem_class")],
+ LowLevelILOperation.LLIL_FLAG_COND: [("condition", "cond"), ("semantic_class", "sem_class")],
LowLevelILOperation.LLIL_FLAG_GROUP: [("semantic_group", "sem_group")],
LowLevelILOperation.LLIL_CMP_E: [("left", "expr"), ("right", "expr")],
LowLevelILOperation.LLIL_CMP_NE: [("left", "expr"), ("right", "expr")],
@@ -399,7 +399,10 @@ class LowLevelILInstruction(object):
i += 1
value = SSAFlag(flag, instr.operands[i])
elif operand_type == "sem_class":
- value = ILSemanticFlagClass(func.arch, instr.operands[i])
+ if instr.operands[i] == 0:
+ value = None
+ else:
+ value = ILSemanticFlagClass(func.arch, instr.operands[i])
elif operand_type == "sem_group":
value = ILSemanticFlagGroup(func.arch, instr.operands[i])
elif operand_type == "cond":