aboutsummaryrefslogtreecommitdiff
path: root/lfunc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lfunc.c')
-rw-r--r--lfunc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lfunc.c b/lfunc.c
index 81ac9f0a..105590fc 100644
--- a/lfunc.c
+++ b/lfunc.c
@@ -190,9 +190,11 @@ void luaF_close (lua_State *L, StkId level, int status, int yy) {
190 UpVal *uv; 190 UpVal *uv;
191 StkId upl; /* stack index pointed by 'uv' */ 191 StkId upl; /* stack index pointed by 'uv' */
192 if (unlikely(status == LUA_ERRMEM && L->ptbc != NULL)) { 192 if (unlikely(status == LUA_ERRMEM && L->ptbc != NULL)) {
193 ptrdiff_t levelrel = savestack(L, level);
193 upl = L->ptbc; 194 upl = L->ptbc;
194 L->ptbc = NULL; /* remove from "list" before closing */ 195 L->ptbc = NULL; /* remove from "list" before closing */
195 prepcallclosemth(L, upl, status, yy); 196 prepcallclosemth(L, upl, status, yy);
197 level = restorestack(L, levelrel);
196 } 198 }
197 else 199 else
198 lua_assert(L->ptbc == NULL); /* must be empty for other status */ 200 lua_assert(L->ptbc == NULL); /* must be empty for other status */