diff options
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 2.183 2017/12/20 14:58:05 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.184 2017/12/28 14:17:09 roberto Exp roberto $ |
3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -418,8 +418,8 @@ void luaD_pretailcall (lua_State *L, CallInfo *ci, StkId func, int n) { | |||
418 | for (i = 0; i < n; i++) /* move down function and arguments */ | 418 | for (i = 0; i < n; i++) /* move down function and arguments */ |
419 | setobjs2s(L, ci->func + i, func + i); | 419 | setobjs2s(L, ci->func + i, func + i); |
420 | checkstackp(L, fsize, func); | 420 | checkstackp(L, fsize, func); |
421 | for (; i < p->numparams; i++) | 421 | for (; i <= p->numparams; i++) |
422 | setnilvalue(s2v(ci->func + i)); /* complete missing parameters */ | 422 | setnilvalue(s2v(ci->func + i)); /* complete missing arguments */ |
423 | if (p->is_vararg) { | 423 | if (p->is_vararg) { |
424 | L->top -= (func - ci->func); /* move down top */ | 424 | L->top -= (func - ci->func); /* move down top */ |
425 | luaT_adjustvarargs(L, p, n - 1); | 425 | luaT_adjustvarargs(L, p, n - 1); |