From 19428d17af07f9f8d8e6d6f204bc262df76b1cca Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Mon, 20 Sep 2021 15:28:19 -0400 Subject: Fix lowlevelil.expr when flag is an int --- python/lowlevelil.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/lowlevelil.py b/python/lowlevelil.py index c80cc5a2..2bf290e0 100644 --- a/python/lowlevelil.py +++ b/python/lowlevelil.py @@ -3039,7 +3039,7 @@ class LowLevelILFunction: core.BNLowLevelILSetIndirectBranches(self.handle, branch_list, len(branches)) def expr(self, operation, a:int=0, b:int=0, c:int=0, d:int=0, size:int=0, - flags:Union['architecture.FlagWriteTypeName', 'architecture.FlagType']=None): + flags:Union['architecture.FlagWriteTypeName', 'architecture.FlagType', 'architecture.FlagIndex']=None): _flags = architecture.FlagIndex(0) if isinstance(operation, str): operation = LowLevelILOperation[operation] @@ -3049,6 +3049,8 @@ class LowLevelILFunction: _flags = self.arch.get_flag_write_type_by_name(architecture.FlagWriteTypeName(flags)) elif isinstance(flags, ILFlag): _flags = flags.index + elif isinstance(flags, int): + _flags = architecture.FlagIndex(flags) elif flags is None: _flags = architecture.FlagIndex(0) else: -- cgit v1.3.1