aboutsummaryrefslogtreecommitdiff
path: root/ltable.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-11-25 11:29:32 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-11-25 11:29:32 -0200
commitdb724e14e0b456a980f16a8adec4f20708c11af4 (patch)
treed374a4135a6c762c54219b5bfa71e6e5d8953be0 /ltable.c
parent1702953293ebdd770963b6fc0499d87d08f05a82 (diff)
downloadlua-db724e14e0b456a980f16a8adec4f20708c11af4.tar.gz
lua-db724e14e0b456a980f16a8adec4f20708c11af4.tar.bz2
lua-db724e14e0b456a980f16a8adec4f20708c11af4.zip
new macro luai_numisnan
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 b640a809..9ad52cfe 100644
--- a/ltable.c
+++ b/ltable.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltable.c,v 2.26 2005/07/11 14:01:37 roberto Exp roberto $ 2** $Id: ltable.c,v 2.27 2005/10/24 17:37:52 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*/
@@ -495,7 +495,7 @@ TValue *luaH_set (lua_State *L, Table *t, const TValue *key) {
495 return cast(TValue *, p); 495 return cast(TValue *, p);
496 else { 496 else {
497 if (ttisnil(key)) luaG_runerror(L, "table index is nil"); 497 if (ttisnil(key)) luaG_runerror(L, "table index is nil");
498 else if (ttisnumber(key) && !luai_numeq(nvalue(key), nvalue(key))) 498 else if (ttisnumber(key) && luai_numisnan(nvalue(key)))
499 luaG_runerror(L, "table index is NaN"); 499 luaG_runerror(L, "table index is NaN");
500 return newkey(L, t, key); 500 return newkey(L, t, key);
501 } 501 }