This commit is contained in:
Roberto Ierusalimschy
2006-01-18 09:49:12 -02:00
parent 440113bbe8
commit baffc37f5c
3 changed files with 9 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: ltable.c,v 2.30 2006/01/10 12:51:53 roberto Exp roberto $
** $Id: ltable.c,v 2.31 2006/01/10 13:13:06 roberto Exp roberto $
** Lua tables (hash)
** See Copyright Notice in lua.h
*/
@@ -122,7 +122,7 @@ static int arrayindex (const TValue *key) {
lua_Number n = nvalue(key);
int k;
lua_number2int(k, n);
if (luai_numeq(cast_num(k), nvalue(key)))
if (luai_numeq(cast_num(k), n))
return k;
}
return -1; /* `key' did not match some condition */