summaryrefslogtreecommitdiffhomepage
path: root/vm.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2024-11-29 14:00:09 +0100
committerJo-Philipp Wich <jo@mein.io>2024-11-29 16:45:07 +0100
commita6e06417785288f66c990e828cccbf9fb9836ba7 (patch)
treece163bcc204c377c1f315fb15e153124d244360f /vm.c
parentef1baabc2c429c715405a39aa8b7fa85060804c0 (diff)
vm: resolve upvalues before pushing them onto the stack
Commit e5fe6b1 ("treewide: refactor vector usage code") accidentially dropped the upvalue resolving logic from uc_vm_stack_push(), leading to unresolved upvalues leaking into the script execution context. Fixes: e5fe6b1 ("treewide: refactor vector usage code") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm.c b/vm.c
index 3dd054b..9488288 100644
--- a/vm.c
+++ b/vm.c
@@ -431,7 +431,7 @@ uc_vm_resolve_upval(uc_vm_t *vm, uc_value_t *value)
void
uc_vm_stack_push(uc_vm_t *vm, uc_value_t *value)
{
- uc_vector_push(&vm->stack, value);
+ uc_vector_push(&vm->stack, uc_vm_resolve_upval(vm, value));
if (vm->trace) {
fprintf(stderr, " [+%zd] %s\n",