From a377529b29b43e35cce8763ec4077b329b218f43 Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Mon, 6 Sep 2021 09:14:22 -0400 Subject: Fix mlil.vars_read --- python/mediumlevelil.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'python/mediumlevelil.py') diff --git a/python/mediumlevelil.py b/python/mediumlevelil.py index ac6fdca4..a9b3e39b 100644 --- a/python/mediumlevelil.py +++ b/python/mediumlevelil.py @@ -461,7 +461,7 @@ class MediumLevelILInstruction: """List of variables read by instruction""" result = [] for operand in self.operands: - if (isinstance(operand, variable.Variable)) or (isinstance(operand, SSAVariable)): + if isinstance(operand, (variable.Variable, SSAVariable)): result.append(operand) elif isinstance(operand, MediumLevelILInstruction): result += operand.vars_read @@ -1867,7 +1867,7 @@ class MediumLevelILSet_var_ssa_field(MediumLevelILInstruction, SetVar, SSA): @property def vars_read(self) -> List[SSAVariable]: - return [self.prev, self.src.vars_read] # type: ignore we're guaranteed not to return non-SSAVariables here + return [self.prev, *self.src.vars_read] # type: ignore we're guaranteed not to return non-SSAVariables here @property def vars_written(self) -> List[SSAVariable]: @@ -1927,7 +1927,7 @@ class MediumLevelILSet_var_aliased_field(MediumLevelILInstruction, SetVar, SSA): @property def vars_read(self) -> List[SSAVariable]: - return [self.prev, self.src.vars_read] # type: ignore we're guaranteed not to return non-SSAVariables here + return [self.prev, *self.src.vars_read] # type: ignore we're guaranteed not to return non-SSAVariables here @property def operands(self) -> List[MediumLevelILOperandType]: -- cgit v1.3.1