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 d365bcdd..9838500b 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1601,15 +1601,17 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
1601 int n = GETARG_B(i) - 1; /* number of results */ 1601 int n = GETARG_B(i) - 1; /* number of results */
1602 if (n < 0) /* not fixed? */ 1602 if (n < 0) /* not fixed? */
1603 n = cast_int(L->top - ra); /* get what is available */ 1603 n = cast_int(L->top - ra); /* get what is available */
1604 else
1605 L->top = ra + n; /* set call for 'luaD_poscall' */
1606 savepc(ci); 1604 savepc(ci);
1607 if (TESTARG_k(i)) { 1605 if (TESTARG_k(i)) {
1608 int nparams1 = GETARG_C(i); 1606 int nparams1 = GETARG_C(i);
1607 if (L->top < ci->top)
1608 L->top = ci->top;
1609 luaF_close(L, base, LUA_OK); /* there may be open upvalues */ 1609 luaF_close(L, base, LUA_OK); /* there may be open upvalues */
1610 updatestack(ci);
1610 if (nparams1) /* vararg function? */ 1611 if (nparams1) /* vararg function? */
1611 ci->func -= ci->u.l.nextraargs + nparams1; 1612 ci->func -= ci->u.l.nextraargs + nparams1;
1612 } 1613 }
1614 L->top = ra + n; /* set call for 'luaD_poscall' */
1613 luaD_poscall(L, ci, n); 1615 luaD_poscall(L, ci, n);
1614 return; 1616 return;
1615 } 1617 }