2
0
Fork 0

Fix reading of lua tables

personal/stbuehler/wip
Stefan Bühler 2009-01-10 15:59:54 +01:00
parent 3477543277
commit f983caccde
1 changed files with 2 additions and 2 deletions

View File

@ -30,9 +30,9 @@ static value* value_from_lua_table(server *srv, lua_State *L, int ndx) {
val = value_new_list();
list = val->data.list;
}
ikey = lua_tointeger(L, -2);
ikey = lua_tointeger(L, -2) - 1;
if (ikey < 0) {
ERROR(srv, "Invalid key < 0: %i - skipping entry", ikey);
ERROR(srv, "Invalid key < 0: %i - skipping entry", ikey + 1);
lua_pop(L, 1);
continue;
}