Browse Source

Merge pull request #551 from CJentzsch/vmfix

VM fix
cl-refactor
Gav Wood 10 years ago
parent
commit
b076a0bcd8
  1. 14
      libevm/VM.h

14
libevm/VM.h

@ -170,15 +170,15 @@ template <class Ext> dev::bytesConstRef dev::eth::VM::go(Ext& _ext, OnOpFunc con
// These all operate on memory and therefore potentially expand it:
case Instruction::MSTORE:
require(2);
newTempSize = m_stack.back() + 32;
newTempSize = (bigint)m_stack.back() + 32;
break;
case Instruction::MSTORE8:
require(2);
newTempSize = m_stack.back() + 1;
newTempSize = (bigint)m_stack.back() + 1;
break;
case Instruction::MLOAD:
require(1);
newTempSize = m_stack.back() + 32;
newTempSize = (bigint)m_stack.back() + 32;
break;
case Instruction::RETURN:
require(2);
@ -233,10 +233,10 @@ template <class Ext> dev::bytesConstRef dev::eth::VM::go(Ext& _ext, OnOpFunc con
case Instruction::CREATE:
{
require(3);
auto inOff = m_stack[m_stack.size() - 2];
auto inSize = m_stack[m_stack.size() - 3];
newTempSize = inOff + inSize;
runGas = c_createGas;
u256 inOff = m_stack[m_stack.size() - 2];
u256 inSize = m_stack[m_stack.size() - 3];
newTempSize = (bigint)inOff + inSize;
runGas = c_createGas;
break;
}
case Instruction::EXP:

Loading…
Cancel
Save