aboutsummaryrefslogtreecommitdiff
path: root/ltm.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltm.c')
-rw-r--r--ltm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ltm.c b/ltm.c
index ae60983f..4770f96b 100644
--- a/ltm.c
+++ b/ltm.c
@@ -240,7 +240,7 @@ void luaT_adjustvarargs (lua_State *L, int nfixparams, CallInfo *ci,
240 int actual = cast_int(L->top - ci->func) - 1; /* number of arguments */ 240 int actual = cast_int(L->top - ci->func) - 1; /* number of arguments */
241 int nextra = actual - nfixparams; /* number of extra arguments */ 241 int nextra = actual - nfixparams; /* number of extra arguments */
242 ci->u.l.nextraargs = nextra; 242 ci->u.l.nextraargs = nextra;
243 checkstackGC(L, p->maxstacksize + 1); 243 luaD_checkstack(L, p->maxstacksize + 1);
244 /* copy function to the top of the stack */ 244 /* copy function to the top of the stack */
245 setobjs2s(L, L->top++, ci->func); 245 setobjs2s(L, L->top++, ci->func);
246 /* move fixed parameters to the top of the stack */ 246 /* move fixed parameters to the top of the stack */
@@ -259,7 +259,7 @@ void luaT_getvarargs (lua_State *L, CallInfo *ci, StkId where, int wanted) {
259 int nextra = ci->u.l.nextraargs; 259 int nextra = ci->u.l.nextraargs;
260 if (wanted < 0) { 260 if (wanted < 0) {
261 wanted = nextra; /* get all extra arguments available */ 261 wanted = nextra; /* get all extra arguments available */
262 checkstackp(L, nextra, where); /* ensure stack space */ 262 checkstackGCp(L, nextra, where); /* ensure stack space */
263 L->top = where + nextra; /* next instruction will need top */ 263 L->top = where + nextra; /* next instruction will need top */
264 } 264 }
265 for (i = 0; i < wanted && i < nextra; i++) 265 for (i = 0; i < wanted && i < nextra; i++)