aboutsummaryrefslogtreecommitdiff
path: root/ltable.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltable.c')
-rw-r--r--ltable.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ltable.c b/ltable.c
index bba96497..11a51e92 100644
--- a/ltable.c
+++ b/ltable.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltable.c,v 1.130 2003/03/20 20:26:33 roberto Exp roberto $ 2** $Id: ltable.c,v 1.131 2003/03/24 14:18: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*/
@@ -154,7 +154,7 @@ int luaH_next (lua_State *L, Table *t, StkId key) {
154 int i = luaH_index(L, t, key); /* find original element */ 154 int i = luaH_index(L, t, key); /* find original element */
155 for (i++; i < t->sizearray; i++) { /* try first array part */ 155 for (i++; i < t->sizearray; i++) { /* try first array part */
156 if (!ttisnil(&t->array[i])) { /* a non-nil value? */ 156 if (!ttisnil(&t->array[i])) { /* a non-nil value? */
157 setnvalue(key, i+1); 157 setnvalue(key, cast(lua_Number, i+1));
158 setobj2s(key+1, &t->array[i]); 158 setobj2s(key+1, &t->array[i]);
159 return 1; 159 return 1;
160 } 160 }
@@ -502,7 +502,7 @@ TObject *luaH_setnum (lua_State *L, Table *t, int key) {
502 return cast(TObject *, p); 502 return cast(TObject *, p);
503 else { 503 else {
504 TObject k; 504 TObject k;
505 setnvalue(&k, key); 505 setnvalue(&k, cast(lua_Number, key));
506 return newkey(L, t, &k); 506 return newkey(L, t, &k);
507 } 507 }
508} 508}