mirror of
https://github.com/mandiant/capa.git
synced 2025-12-12 15:49:46 -08:00
optimizer: fix sort order
This commit is contained in:
@@ -47,7 +47,7 @@ def optimize_statement(statement):
|
||||
|
||||
if isinstance(statement, (ceng.And, ceng.Or, ceng.Some)):
|
||||
# has .children
|
||||
statement.children = sorted(statement.children, key=lambda n: -get_node_cost(n))
|
||||
statement.children = sorted(statement.children, key=lambda n: get_node_cost(n))
|
||||
return
|
||||
elif isinstance(statement, (ceng.Not, ceng.Range)):
|
||||
# has .child
|
||||
|
||||
Reference in New Issue
Block a user