From a7bad0e96b63039b120c938af12b7224ecff218c Mon Sep 17 00:00:00 2001 From: Bernhard Mueller Date: Fri, 14 Jun 2019 16:35:29 +0200 Subject: [PATCH] Fix annotation copy --- mythril/analysis/modules/delegatecall.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mythril/analysis/modules/delegatecall.py b/mythril/analysis/modules/delegatecall.py index 4eeec52b..55d61532 100644 --- a/mythril/analysis/modules/delegatecall.py +++ b/mythril/analysis/modules/delegatecall.py @@ -2,6 +2,7 @@ import json import logging from typing import List, cast +from copy import copy from mythril.analysis import solver from mythril.analysis.swc_data import DELEGATECALL_TO_UNTRUSTED_CONTRACT @@ -32,11 +33,7 @@ class DelegateCallAnnotation(StateAnnotation): ) def __copy__(self): - result = DelegateCallAnnotation() - result.call_state = self.call_state - result.return_value = self.return_value - result.constraints = copy(self.constraints) - return result + return DelegateCallAnnotation(self.call_state, copy(self.constraints)) def get_issue(self, global_state: GlobalState, transaction_sequence: str) -> Issue: """