Skip to content

Commit

Permalink
Merge pull request #104 from ewasm/create-returndata
Browse files Browse the repository at this point in the history
EEI: create should clear the return data buffer on success
  • Loading branch information
axic authored Jan 22, 2018
2 parents 47fc964 + 3d9d0a7 commit 72e5ad4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/eei.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,10 +589,10 @@ namespace HeraVM {

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

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

0 comments on commit 72e5ad4

Please sign in to comment.