execute_func: Newline only for non-empty returns

For void functions, the return value array is empty. Don't print the newline then.
This commit is contained in:
Stefan Wallentowitz 2024-07-22 18:33:15 +02:00 committed by GitHub
parent 058bc47102
commit ed152e847a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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++) {