protoverse

A metaverse protocol
git clone git://jb55.com/protoverse
Log | Files | Refs | README | LICENSE

commit 37169943d40b4f452b1ed3ce38a0c7c6a936e5f6
parent 2f1256aa3acb498bb39f80ff0231fd4c3672493b
Author: William Casarin <jb55@jb55.com>
Date:   Sun,  1 Aug 2021 10:49:00 -0700

set retval from prog

Diffstat:
Msrc/wasm.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/wasm.c b/src/wasm.c @@ -6066,11 +6066,11 @@ static int find_start_function(struct module *module) return module->start_section.start_fn; } - if ((res = find_function(module, "start")) != -1) { + if ((res = find_function(module, "_start")) != -1) { return res; } - return find_function(module, "_start"); + return find_function(module, "start"); } void wasm_parser_init(struct wasm_parser *p, u8 *wasm, size_t wasm_len, size_t arena_size) @@ -6725,7 +6725,7 @@ int interp_wasm_module(struct wasm_interp *interp, int *retval) } if (interp_code(interp)) { - *retval = 0; + stack_pop_i32(interp, retval); debug("interp success!!\n"); } else if (interp->quitting) { stack_pop_i32(interp, retval);