Browse Source

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

cl-refactor
Paweł Bylica 10 years ago
parent
commit
170ca152a4
  1. 3
      libevmjit/ExecutionEngine.cpp

3
libevmjit/ExecutionEngine.cpp

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

Loading…
Cancel
Save