From 5b786e18665a5b3ce8272dbd4a841440a7606285 Mon Sep 17 00:00:00 2001 From: Bernhard Mueller Date: Thu, 22 Feb 2018 12:22:49 +0000 Subject: [PATCH] Fix logical bug in parsing solc output --- mythril/ether/soliditycontract.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mythril/ether/soliditycontract.py b/mythril/ether/soliditycontract.py index c81da6e8..84a0f1b0 100644 --- a/mythril/ether/soliditycontract.py +++ b/mythril/ether/soliditycontract.py @@ -28,11 +28,11 @@ class SolidityContract(ETHContract): code = file.read() self.solidity_files.append(SolidityFile(filename, code)) + has_contract = False + for key, contract in data['contracts'].items(): filename, name = key.split(":") - has_contract = False - if filename == input_file and len(contract['bin-runtime']): self.name = name self.code = contract['bin-runtime']