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 changed files with 1 additions and 0 deletions

1
vm.c
View File

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