diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-11-25 11:29:32 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-11-25 11:29:32 -0200 |
commit | db724e14e0b456a980f16a8adec4f20708c11af4 (patch) | |
tree | d374a4135a6c762c54219b5bfa71e6e5d8953be0 /ltable.c | |
parent | 1702953293ebdd770963b6fc0499d87d08f05a82 (diff) | |
download | lua-db724e14e0b456a980f16a8adec4f20708c11af4.tar.gz lua-db724e14e0b456a980f16a8adec4f20708c11af4.tar.bz2 lua-db724e14e0b456a980f16a8adec4f20708c11af4.zip |
new macro luai_numisnan
Diffstat (limited to 'ltable.c')
-rw-r--r-- | ltable.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 | } |