aboutsummaryrefslogtreecommitdiff
path: root/ltable.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-11-24 17:16:03 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-11-24 17:16:03 -0200
commit1d99a7360beaf1a50a3739413b1ad6ed4b71491d (patch)
treec34e5b49da29838858f2e9bfc46eac29816cd13f /ltable.c
parent2f82bf6fe940557fb5258c65c03e18f097ff831f (diff)
downloadlua-1d99a7360beaf1a50a3739413b1ad6ed4b71491d.tar.gz
lua-1d99a7360beaf1a50a3739413b1ad6ed4b71491d.tar.bz2
lua-1d99a7360beaf1a50a3739413b1ad6ed4b71491d.zip
details
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 968b8395..a55b510d 100644
--- a/ltable.c
+++ b/ltable.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltable.c,v 2.7 2004/10/06 18:34:16 roberto Exp roberto $ 2** $Id: ltable.c,v 2.8 2004/11/24 18:55:42 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*/
@@ -393,7 +393,7 @@ static TValue *newkey (lua_State *L, Table *t, const TValue *key) {
393*/ 393*/
394const TValue *luaH_getnum (Table *t, int key) { 394const TValue *luaH_getnum (Table *t, int key) {
395 /* (1 <= key && key <= t->sizearray) */ 395 /* (1 <= key && key <= t->sizearray) */
396 if ((unsigned int)(key-1) < (unsigned int)t->sizearray) 396 if (cast(unsigned int, key-1) < cast(unsigned int, t->sizearray))
397 return &t->array[key-1]; 397 return &t->array[key-1];
398 else { 398 else {
399 lua_Number nk = cast(lua_Number, key); 399 lua_Number nk = cast(lua_Number, key);