From d0b9ad3c48415669e7941eee0262516f9b9a8119 Mon Sep 17 00:00:00 2001 From: Michael Pfaff Date: Thu, 6 Jul 2023 22:13:31 -0400 Subject: [PATCH] Allow C functions to yield (unforseen consequences be damned) --- VM/src/ldo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VM/src/ldo.cpp b/VM/src/ldo.cpp index e5fde4d..365c7de 100644 --- a/VM/src/ldo.cpp +++ b/VM/src/ldo.cpp @@ -298,7 +298,7 @@ static void resume_continue(lua_State* L) int n = cl->c.cont(L, 0); // Continuation can break again - if (L->status == LUA_BREAK) + if (L->status == LUA_BREAK || L->status == LUA_YIELD) break; luau_poscall(L, L->top - n);