rules: ruleset: fix collection of features under not statements

This commit is contained in:
William Ballenthin
2021-11-10 12:44:19 -07:00
parent 67884dd255
commit 1406dc28d9

View File

@@ -1053,7 +1053,7 @@ class RuleSet:
rules_with_hard_features.add(rule)
elif isinstance(node, capa.features.common.Feature):
# easy feature: hash lookup
if under_not_statement:
if not under_not_statement:
rules_with_easy_features.add(rule)
rules_by_feature[node].add(rule)
elif isinstance(node, (ceng.Not)):