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 from mythril.version import VERSION
def exit_with_error(format_type, message): def exit_with_error(format_, message):
if format_type == 'text' or format_type == 'markdown': if format_ == 'text' or format_ == 'markdown':
print(message) print(message)
else: else:
result = {'success': False, 'error': str(message), 'issues': []} result = {'success': False, 'error': str(message), 'issues': []}

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

Loading…
Cancel
Save