fix: reset apiStack to NULL after foreign constructor returns to prevent broken state on subsequent wrenCall

This commit is contained in:
Bob Nystrom
2016-08-28 15:23:27 +00:00
parent a82c4d7263
commit 8d3a7eabb9
6 changed files with 82 additions and 1 deletions
+1
View File
@@ -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.
}