Yul interpreter: Out of bounds mloads return zero

This commit is contained in:
Bhargava Shastry 2019-09-03 09:50:29 +02:00
parent 9a6357ab09
commit 6427ec661a

View File

@ -250,8 +250,7 @@ u256 EVMInstructionInterpreter::eval(
case Instruction::MLOAD:
if (accessMemory(arg[0], 0x20))
return readMemoryWord(arg[0]);
else
return 0x1234 + arg[0];
return 0;
case Instruction::MSTORE:
if (accessMemory(arg[0], 0x20))
writeMemoryWord(arg[0], arg[1]);