Close upvalues even if exception exits runtime
This commit is contained in:
parent
ee86a241e0
commit
8213430712
1
src/vm.c
1
src/vm.c
@ -1768,6 +1768,7 @@ static int handleException() {
|
||||
krk_currentThread.frameCount = krk_currentThread.exitOnFrame;
|
||||
|
||||
/* Ensure stack is in the expected place, as if we returned None. */
|
||||
closeUpvalues(exitSlot);
|
||||
krk_currentThread.stackTop = &krk_currentThread.stack[exitSlot];
|
||||
|
||||
/* If exitSlot was not 0, there was an exception during a call to runNext();
|
||||
|
Loading…
Reference in New Issue
Block a user