Reset the API stack after a foreign constructor returns.
This commit is contained in:
@@ -659,6 +659,7 @@ static void createForeign(WrenVM* vm, ObjFiber* fiber, Value* stack)
|
||||
|
||||
method->fn.foreign(vm);
|
||||
|
||||
vm->apiStack = NULL;
|
||||
// TODO: Check that allocateForeign was called.
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user