Browse Source

Throw bad instruction exception in case instruction is bad

cl-refactor
Paweł Bylica 10 years ago
parent
commit
ddb6392338
  1. 4
      libevm/VM.h

4
libevm/VM.h

@ -188,6 +188,10 @@ template <class Ext> dev::bytesConstRef dev::eth::VM::go(Ext& _ext, OnOpFunc con
// EXECUTE...
switch (inst)
{
default:
BOOST_THROW_EXCEPTION(BadInstruction());
break;
case Instruction::ADD:
//pops two items and pushes S[-1] + S[-2] mod 2^256.
require(2);

Loading…
Cancel
Save