Fix the source index problem by using proper function name

pull/1059/head
Nikhil Parasaram 6 years ago
parent 01e15f0454
commit 3a1f3a77c3
  1. 6
      mythril/laser/ethereum/svm.py

@ -436,7 +436,11 @@ class LaserEVM:
environment = state.environment
disassembly = environment.code
if address in disassembly.address_to_function_name:
if isinstance(
state.world_state.transaction_sequence[-1], ContractCreationTransaction
):
environment.active_function_name = "constructor"
elif address in disassembly.address_to_function_name:
# Enter a new function
environment.active_function_name = disassembly.address_to_function_name[
address

Loading…
Cancel
Save