diff options
Diffstat (limited to '')
-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.2 2004/03/23 17:02:58 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.3 2004/04/30 20:13:38 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 | */ |
@@ -193,7 +193,7 @@ static void adjust_varargs (lua_State *L, int nfixargs, StkId base) { | |||
193 | actual -= nfixargs; /* number of extra arguments */ | 193 | actual -= nfixargs; /* number of extra arguments */ |
194 | htab = luaH_new(L, actual, 1); /* create `arg' table */ | 194 | htab = luaH_new(L, actual, 1); /* create `arg' table */ |
195 | for (i=0; i<actual; i++) /* put extra arguments into `arg' table */ | 195 | for (i=0; i<actual; i++) /* put extra arguments into `arg' table */ |
196 | setobj2n(L, luaH_setnum(L, htab, i+1), L->top - actual + i); | 196 | setobj2n(L, luaH_setnum(L, htab, i+LUA_FIRSTINDEX), L->top - actual + i); |
197 | /* store counter in field `n' */ | 197 | /* store counter in field `n' */ |
198 | setnvalue(luaH_setstr(L, htab, luaS_newliteral(L, "n")), | 198 | setnvalue(luaH_setstr(L, htab, luaS_newliteral(L, "n")), |
199 | cast(lua_Number, actual)); | 199 | cast(lua_Number, actual)); |