Fixed NetVars hook mistakenly assuming index starts from 0.

This commit is contained in:
Yukita Mayako 2015-09-03 13:13:55 -04:00
parent 775ccde424
commit 52e2087ee7

View file

@ -743,7 +743,7 @@ static int NetArchive(lua_State *L)
{
int TABLESINDEX = lua_upvalueindex(1);
int i, n = lua_gettop(L);
for (i = 0; i < n; i++)
for (i = 1; i <= n; i++)
ArchiveValue(TABLESINDEX, i);
return n;
}
@ -893,7 +893,7 @@ static int NetUnArchive(lua_State *L)
{
int TABLESINDEX = lua_upvalueindex(1);
int i, n = lua_gettop(L);
for (i = 0; i < n; i++)
for (i = 1; i <= n; i++)
UnArchiveValue(TABLESINDEX);
return n;
}