diff options
Diffstat (limited to 'ltable.c')
-rw-r--r-- | ltable.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltable.c,v 1.1 2001/11/29 22:14:34 rieru Exp rieru $ | 2 | ** $Id: ltable.c,v 1.93 2001/12/11 22:48:44 roberto Exp roberto $ |
3 | ** Lua tables (hash) | 3 | ** Lua tables (hash) |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -97,7 +97,7 @@ int luaH_index (lua_State *L, Table *t, const TObject *key) { | |||
97 | int i; | 97 | int i; |
98 | if (ttype(key) == LUA_TNIL) return -1; /* first iteration */ | 98 | if (ttype(key) == LUA_TNIL) return -1; /* first iteration */ |
99 | i = arrayindex(key); | 99 | i = arrayindex(key); |
100 | if (0 <= i && i < t->sizearray) { /* is `key' inside array part? */ | 100 | if (0 <= i && i <= t->sizearray) { /* is `key' inside array part? */ |
101 | return i-1; /* yes; that's the index (corrected to C) */ | 101 | return i-1; /* yes; that's the index (corrected to C) */ |
102 | } | 102 | } |
103 | else { | 103 | else { |