aboutsummaryrefslogtreecommitdiff
path: root/lvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lvm.c')
-rw-r--r--lvm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lvm.c b/lvm.c
index 0d82756b..2a1ee175 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1452,7 +1452,8 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
1452 vmbreak; 1452 vmbreak;
1453 } 1453 }
1454 vmcase(OP_CLOSE) { 1454 vmcase(OP_CLOSE) {
1455 luaF_close(L, ra, LUA_OK); 1455 L->top = ra + 1; /* everything is free after this slot */
1456 ProtectNT(luaF_close(L, ra, LUA_OK));
1456 vmbreak; 1457 vmbreak;
1457 } 1458 }
1458 vmcase(OP_TBC) { 1459 vmcase(OP_TBC) {
@@ -1619,13 +1620,14 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
1619 n = cast_int(L->top - ra); /* get what is available */ 1620 n = cast_int(L->top - ra); /* get what is available */
1620 else 1621 else
1621 L->top = ra + n; /* set call for 'luaD_poscall' */ 1622 L->top = ra + n; /* set call for 'luaD_poscall' */
1623 savepc(ci);
1622 if (TESTARG_k(i)) { 1624 if (TESTARG_k(i)) {
1623 int nparams1 = GETARG_C(i); 1625 int nparams1 = GETARG_C(i);
1624 if (nparams1) /* vararg function? */ 1626 if (nparams1) /* vararg function? */
1625 ci->func -= ci->u.l.nextraargs + nparams1; 1627 ci->func -= ci->u.l.nextraargs + nparams1;
1626 luaF_close(L, base, LUA_OK); /* there may be open upvalues */ 1628 luaF_close(L, base, LUA_OK); /* there may be open upvalues */
1627 } 1629 }
1628 halfProtect(luaD_poscall(L, ci, n)); 1630 luaD_poscall(L, ci, n);
1629 return; 1631 return;
1630 } 1632 }
1631 vmcase(OP_RETURN0) { 1633 vmcase(OP_RETURN0) {