From 0ba1b7842e024bda9939bea6e2683eb84601eeef Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Tue, 10 Jun 2014 14:25:08 +0100 Subject: [PATCH] += should have been = in VM gas calc. --- libevm/VM.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libevm/VM.h b/libevm/VM.h index 2c90d5a32..f6675bc38 100644 --- a/libevm/VM.h +++ b/libevm/VM.h @@ -120,7 +120,7 @@ template eth::bytesConstRef eth::VM::go(Ext& _ext, uint64_t _steps) break; case Instruction::SLOAD: - runGas += c_sloadGas; + runGas = c_sloadGas; break; // These all operate on memory and therefore potentially expand it: @@ -170,7 +170,7 @@ template eth::bytesConstRef eth::VM::go(Ext& _ext, uint64_t _steps) unsigned inOff = (unsigned)m_stack[m_stack.size() - 2]; unsigned inSize = (unsigned)m_stack[m_stack.size() - 3]; newTempSize = inOff + inSize; - runGas += c_createGas; + runGas = c_createGas; break; }