Skip to content

Commit 6530578

Browse files
committed
Python: Fix LLILFunction.flag() calling the flag reg
1 parent 3113507 commit 6530578

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

python/lowlevelil.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4219,31 +4219,31 @@ def float_const_double(self, value: float, loc: Optional['ILSourceLocation'] = N
42194219
"""
42204220
return self.expr(LowLevelILOperation.LLIL_FLOAT_CONST, struct.unpack("Q", struct.pack("d", value))[0], size=8, source_location=loc)
42214221

4222-
def flag(self, reg: 'architecture.FlagName', loc: Optional['ILSourceLocation'] = None) -> ExpressionIndex:
4222+
def flag(self, flag: 'architecture.FlagName', loc: Optional['ILSourceLocation'] = None) -> ExpressionIndex:
42234223
"""
42244224
``flag`` returns a flag expression for the given flag name.
42254225
4226-
:param architecture.FlagName reg: name of the flag expression to retrieve
4226+
:param architecture.FlagName flag: name of the flag expression to retrieve
42274227
:param ILSourceLocation loc: location of returned expression
42284228
:return: A flag expression of given flag name
42294229
:rtype: ExpressionIndex
42304230
"""
4231-
return self.expr(LowLevelILOperation.LLIL_FLAG, self.arch.get_flag_by_name(reg), source_location=loc)
4231+
return self.expr(LowLevelILOperation.LLIL_FLAG, self.arch.get_flag_by_name(flag), source_location=loc)
42324232

42334233
def flag_bit(
4234-
self, size: int, reg: 'architecture.FlagName', bit: int, loc: Optional['ILSourceLocation'] = None
4234+
self, size: int, flag: 'architecture.FlagName', bit: int, loc: Optional['ILSourceLocation'] = None
42354235
) -> ExpressionIndex:
42364236
"""
4237-
``flag_bit`` sets the flag named ``reg`` and size ``size`` to the constant integer value ``bit``
4237+
``flag_bit`` sets the flag named ``flag`` and size ``size`` to the constant integer value ``bit``
42384238
42394239
:param int size: the size of the flag
4240-
:param str reg: flag value
4240+
:param str flag: flag value
42414241
:param int bit: integer value to set the bit to
42424242
:param ILSourceLocation loc: location of returned expression
4243-
:return: A constant expression of given value and size ``FLAG.reg = bit``
4243+
:return: A constant expression of given value and size ``FLAG.flag = bit``
42444244
:rtype: ExpressionIndex
42454245
"""
4246-
return self.expr(LowLevelILOperation.LLIL_FLAG_BIT, self.arch.get_flag_by_name(reg), bit, size=size, source_location=loc)
4246+
return self.expr(LowLevelILOperation.LLIL_FLAG_BIT, self.arch.get_flag_by_name(flag), bit, size=size, source_location=loc)
42474247

42484248
def add(
42494249
self, size: int, a: ExpressionIndex, b: ExpressionIndex, flags: Optional['architecture.FlagType'] = None,

0 commit comments

Comments
 (0)