From 5d633bf6e21af1a6c093433547da65e1d810aa14 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Fri, 7 Nov 2025 12:18:21 +0100 Subject: set_local.c: Fix set_param to valid next set_local is meant to write a local variable, while allowing the use of a caller-defined callback when finished. While this was already correctly implemented by set_local, set_param was incorrectly calling nwp_interp_resume instead of the caller-defined callback. This had the side effect of tee_local not being able to push the value into the stack when the local index referred to a parameter, thus causing undefined behaviour. --- src/routines/set_local.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routines/set_local.c b/src/routines/set_local.c index 84c7c26..99764d3 100644 --- a/src/routines/set_local.c +++ b/src/routines/set_local.c @@ -97,7 +97,7 @@ static enum nw_state set_param(struct nw_interp *const i) if (n) return n; - nwp_interp_resume(i); + i->next = sl->next; return NW_AGAIN; } -- cgit v1.2.3