Skip to content

Commit

Permalink
EEI: on create failure the resultOffset should not be written to
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Jan 16, 2018
1 parent 8489796 commit 146da7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/eei.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,8 @@ namespace HeraVM {

evm_result create_result;
context->fn_table->call(&create_result, context, &create_message);
storeUint160(create_result.create_address, resultOffset);
if (create_result.status_code == EVM_SUCCESS)
storeUint160(create_result.create_address, resultOffset);

if (create_result.output_data) {
lastReturnData.assign(create_result.output_data, create_result.output_data + create_result.output_size);
Expand Down

0 comments on commit 146da7e

Please # to comment.