Skip to content

Commit

Permalink
execute_func: Newline only for non-empty returns
Browse files Browse the repository at this point in the history
For void functions, the return value array is empty. Don't print the newline then.
  • Loading branch information
wallento authored Jul 22, 2024
1 parent 058bc47 commit ed152e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/iwasm/common/wasm_application.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,9 @@ execute_func(WASMModuleInstanceCommon *module_inst, const char *name,
if (j < (uint32)(type->result_count - 1))
os_printf(",");
}
os_printf("\n");
if (type->result_count > 0) {
os_printf("\n");
}

#if WASM_ENABLE_GC != 0
for (j = 0; j < num_local_ref_pushed; j++) {
Expand Down

0 comments on commit ed152e8

Please sign in to comment.