Rename format var and refactor mstore memory loop

pull/555/head
Dominik Muhs 6 years ago
parent b53ac587c5
commit 8f8bf3e7c1
  1. 4
      mythril/interfaces/cli.py
  2. 6
      mythril/laser/ethereum/instructions.py

@ -17,8 +17,8 @@ from mythril.mythril import Mythril
from mythril.version import VERSION
def exit_with_error(format_type, message):
if format_type == 'text' or format_type == 'markdown':
def exit_with_error(format_, message):
if format_ == 'text' or format_ == 'markdown':
print(message)
else:
result = {'success': False, 'error': str(message), 'issues': []}

@ -707,10 +707,8 @@ class Instruction:
try:
# Attempt to concretize value
_bytes = util.concrete_int_to_bytes(value)
for i, b in enumerate(_bytes):
state.memory[mstart + i] = b
bytes_ = util.concrete_int_to_bytes(value)
state.memory[mstart: mstart + len(bytes_)] = bytes_
except:
try:
state.memory[mstart] = value

Loading…
Cancel
Save