diff options
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 2.18 2005/03/16 20:02:48 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.19 2005/03/18 18:55: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 | */ |
@@ -202,7 +202,7 @@ static StkId adjust_varargs (lua_State *L, int nfixargs, int actual, | |||
202 | luaC_checkGC(L); | 202 | luaC_checkGC(L); |
203 | htab = luaH_new(L, nvar, 1); /* create `arg' table */ | 203 | htab = luaH_new(L, nvar, 1); /* create `arg' table */ |
204 | for (i=0; i<nvar; i++) /* put extra arguments into `arg' table */ | 204 | for (i=0; i<nvar; i++) /* put extra arguments into `arg' table */ |
205 | setobj2n(L, luaH_setnum(L, htab, i+LUA_FIRSTINDEX), L->top - nvar + i); | 205 | setobj2n(L, luaH_setnum(L, htab, i+1), L->top - nvar + i); |
206 | /* store counter in field `n' */ | 206 | /* store counter in field `n' */ |
207 | setnvalue(luaH_setstr(L, htab, luaS_newliteral(L, "n")), | 207 | setnvalue(luaH_setstr(L, htab, luaS_newliteral(L, "n")), |
208 | cast(lua_Number, nvar)); | 208 | cast(lua_Number, nvar)); |