diff options
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 2.43 2006/09/19 13:57:50 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.44 2006/10/10 17:40:17 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 | */ |
@@ -278,11 +278,8 @@ int luaD_precall (lua_State *L, StkId func, int nresults) { | |||
278 | Proto *p = cl->p; | 278 | Proto *p = cl->p; |
279 | luaD_checkstack(L, p->maxstacksize); | 279 | luaD_checkstack(L, p->maxstacksize); |
280 | func = restorestack(L, funcr); | 280 | func = restorestack(L, funcr); |
281 | if (!p->is_vararg) { /* no varargs? */ | 281 | if (!p->is_vararg) /* no varargs? */ |
282 | base = func + 1; | 282 | base = func + 1; |
283 | if (L->top > base + p->numparams) | ||
284 | L->top = base + p->numparams; | ||
285 | } | ||
286 | else { /* vararg function */ | 283 | else { /* vararg function */ |
287 | int nargs = cast_int(L->top - func) - 1; | 284 | int nargs = cast_int(L->top - func) - 1; |
288 | base = adjust_varargs(L, p, nargs); | 285 | base = adjust_varargs(L, p, nargs); |