From db724e14e0b456a980f16a8adec4f20708c11af4 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 25 Nov 2005 11:29:32 -0200 Subject: new macro luai_numisnan --- ltable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ltable.c') diff --git a/ltable.c b/ltable.c index b640a809..9ad52cfe 100644 --- a/ltable.c +++ b/ltable.c @@ -1,5 +1,5 @@ /* -** $Id: ltable.c,v 2.26 2005/07/11 14:01:37 roberto Exp roberto $ +** $Id: ltable.c,v 2.27 2005/10/24 17:37:52 roberto Exp roberto $ ** Lua tables (hash) ** See Copyright Notice in lua.h */ @@ -495,7 +495,7 @@ TValue *luaH_set (lua_State *L, Table *t, const TValue *key) { return cast(TValue *, p); else { if (ttisnil(key)) luaG_runerror(L, "table index is nil"); - else if (ttisnumber(key) && !luai_numeq(nvalue(key), nvalue(key))) + else if (ttisnumber(key) && luai_numisnan(nvalue(key))) luaG_runerror(L, "table index is NaN"); return newkey(L, t, key); } -- cgit v1.2.3-55-g6feb