diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-11-07 12:18:21 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-11-07 12:18:21 +0100 |
| commit | 5d633bf6e21af1a6c093433547da65e1d810aa14 (patch) | |
| tree | e0b63dcb8e3bb996ef8eb97c615d7a2a9f4dc563 | |
| parent | c33a13fba8a0674fcc2d835021cc37f6cfe3d8fa (diff) | |
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.
| -rw-r--r-- | src/routines/set_local.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |
