From 4fa7cbb6ac4e6d6b926f8d0cada16afb6c436002 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Tue, 11 Nov 2014 10:56:41 +0000 Subject: [PATCH] Merge #505 --- libethereum/State.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libethereum/State.cpp b/libethereum/State.cpp index d468d33ec..5eb315439 100644 --- a/libethereum/State.cpp +++ b/libethereum/State.cpp @@ -1195,7 +1195,10 @@ bool State::call(Address _receiveAddress, Address _codeAddress, Address _senderA if (it != c_precompiled.end()) { if (*_gas < it->second.gas) + { + *_gas = 0; return false; + } *_gas -= it->second.gas; it->second.exec(_data, _out);