From 786df04aacca4d79188a815ffe63fdc5ee1145aa Mon Sep 17 00:00:00 2001 From: Joran Honig Date: Sun, 29 Apr 2018 14:22:36 +0200 Subject: [PATCH] Use different re function --- mythril/analysis/modules/transaction_order_independence.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mythril/analysis/modules/transaction_order_independence.py b/mythril/analysis/modules/transaction_order_independence.py index 786fffc3..79dc7a2a 100644 --- a/mythril/analysis/modules/transaction_order_independence.py +++ b/mythril/analysis/modules/transaction_order_independence.py @@ -54,11 +54,8 @@ def _get_states_with_opcode(statespace, opcode): def _dependent_on_storage(expression): """ Checks if expression is dependent on a storage symbol and returns the influencing storages""" - pattern = re.compile(r"storage_([a-z0-9_&^]+)") - result = pattern.search(str(simplify(expression))) - if result is not None: - return [result.group()] - return [] + pattern = re.compile(r"storage_[a-z0-9_&^]+") + return pattern.findall(str(simplify(expression))) def _get_storage_variable(storage, state):