diff options
| author | Peter LaFosse <peter@vector35.com> | 2021-09-06 09:14:22 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2021-09-06 11:46:44 -0400 |
| commit | a377529b29b43e35cce8763ec4077b329b218f43 (patch) | |
| tree | 9882c7d5965b4531b3868c3bea88b89f65c8fe2a /python | |
| parent | 766435f251831342be897755f01232a779e72360 (diff) | |
Fix mlil.vars_read
Diffstat (limited to 'python')
| -rw-r--r-- | python/mediumlevelil.py | 6 |
1 files changed, 3 insertions, 3 deletions
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]: |
