Null gas in case of out-of-gas exception [Delivers #81118624]

This commit is contained in:
Paweł Bylica 2014-10-21 19:52:08 +02:00
parent 54c636a376
commit 170ca152a4

View file

@ -114,7 +114,8 @@ int ExecutionEngine::run(std::unique_ptr<llvm::Module> _module, u256& _gas, ExtV
else else
returnCode = static_cast<ReturnCode>(r); returnCode = static_cast<ReturnCode>(r);
_gas = Runtime::getGas(); // Return remaining gas
_gas = returnCode == ReturnCode::OutOfGas ? 0 : Runtime::getGas();
if (returnCode == ReturnCode::Return) if (returnCode == ReturnCode::Return)
{ {