1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-16 18:29:56 +00:00

Fix return bug that caused problems with

resetting the pc.
This commit is contained in:
Calvin Rose 2017-02-12 10:49:45 -05:00
parent b9a9a9303c
commit 47d9aceb0a

1
vm.c
View File

@ -334,6 +334,7 @@ static void VMReturn(VM * vm, Value ret) {
if (thread->count == 0) { if (thread->count == 0) {
VMExit(vm, ret); VMExit(vm, ret);
} }
frame = ThreadFrame(thread);
vm->pc = frame->pc; vm->pc = frame->pc;
vm->base[frame->ret] = ret; vm->base[frame->ret] = ret;
} }