mirror of
https://github.com/mandiant/capa.git
synced 2025-12-22 15:16:22 -08:00
Fix KeyError in Range#evaluate()
If the key doesn't exist, `evaluate` raises a `KeyError` Exception, making the tests fail.
This commit is contained in:
@@ -158,7 +158,7 @@ class Range(Statement):
|
||||
if self.min == 0 and count == 0:
|
||||
return Result(True, self, [])
|
||||
|
||||
return Result(self.min <= count <= self.max, self, [], locations=ctx[self.child])
|
||||
return Result(self.min <= count <= self.max, self, [], locations=ctx.get(self.child))
|
||||
|
||||
def __str__(self):
|
||||
if self.max == (1 << 64 - 1):
|
||||
|
||||
Reference in New Issue
Block a user