From 2bfa13e520e53210b96ead88f49a9ca20c5a5d18 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 5 Feb 2021 11:00:28 -0300 Subject: Fixed some bugs around stack reallocation Long time without using HARDSTACKTESTS... --- lapi.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lapi.c') diff --git a/lapi.c b/lapi.c index 163533a2..27bf23da 100644 --- a/lapi.c +++ b/lapi.c @@ -207,6 +207,7 @@ LUA_API void lua_closeslot (lua_State *L, int idx) { uplevel(L->openupval) == level, "no variable to close at given level"); luaF_close(L, level, CLOSEKTOP, 0); + level = index2stack(L, idx); /* stack may be moved */ setnilvalue(s2v(level)); lua_unlock(L); } -- cgit v1.2.3-55-g6feb