aboutsummaryrefslogtreecommitdiff
path: root/ltable.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltable.c')
-rw-r--r--ltable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ltable.c b/ltable.c
index a4828fca..486b09a8 100644
--- a/ltable.c
+++ b/ltable.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltable.c,v 1.86 2001/09/07 17:30:16 roberto Exp $ 2** $Id: ltable.c,v 1.87 2001/10/25 19:14:14 roberto Exp $
3** Lua tables (hash) 3** Lua tables (hash)
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -96,7 +96,7 @@ int luaH_index (lua_State *L, Table *t, const TObject *key) {
96 if (ttype(key) == LUA_TNIL) return -1; /* first iteration */ 96 if (ttype(key) == LUA_TNIL) return -1; /* first iteration */
97 i = arrayindex(key); 97 i = arrayindex(key);
98 if (0 <= i && i < t->sizearray) { /* is `key' inside array part? */ 98 if (0 <= i && i < t->sizearray) { /* is `key' inside array part? */
99 return i; /* yes; that's the index */ 99 return i-1; /* yes; that's the index (corrected to C) */
100 } 100 }
101 else { 101 else {
102 const TObject *v = luaH_get(t, key); 102 const TObject *v = luaH_get(t, key);