From bd8c3f8cd4d9c0911546393094d4a18457792a94 Mon Sep 17 00:00:00 2001 From: Nathan Date: Tue, 24 Sep 2019 09:13:37 -0400 Subject: [PATCH] Minor improvements to user_assertions.py --- mythril/analysis/modules/user_assertions.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/mythril/analysis/modules/user_assertions.py b/mythril/analysis/modules/user_assertions.py index 0e68475e..bef9c33a 100644 --- a/mythril/analysis/modules/user_assertions.py +++ b/mythril/analysis/modules/user_assertions.py @@ -55,14 +55,9 @@ class UserAssertions(DetectionModule): :param state: :return: """ - mem_start = state.mstate.stack[-1] - size = state.mstate.stack[-2] - topic = state.mstate.stack[-3] + topic, size, mem_start = state.mstate.stack[-3:] - if topic.symbolic: - return [] - - if topic.value != assertion_failed_hash: + if topic.symbolic or topic.value != assertion_failed_hash: return [] message = None