diff options
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/lua51/ltable.c')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua51/ltable.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lua51/ltable.c b/Build/source/texk/web2c/luatexdir/lua51/ltable.c index bc91cacd637..ec84f4fabc5 100644 --- a/Build/source/texk/web2c/luatexdir/lua51/ltable.c +++ b/Build/source/texk/web2c/luatexdir/lua51/ltable.c @@ -1,5 +1,5 @@ /* -** $Id: ltable.c,v 2.32 2006/01/18 11:49:02 roberto Exp $ +** $Id: ltable.c,v 2.32.1.2 2007/12/28 15:32:23 roberto Exp $ ** Lua tables (hash) ** See Copyright Notice in lua.h */ @@ -84,8 +84,8 @@ static const Node dummynode_ = { static Node *hashnum (const Table *t, lua_Number n) { unsigned int a[numints]; int i; - n += 1; /* normalize number (avoid -0) */ - lua_assert(sizeof(a) <= sizeof(n)); + if (luai_numeq(n, 0)) /* avoid problems with -0 */ + return gnode(t, 0); memcpy(a, &n, sizeof(a)); for (i = 1; i < numints; i++) a[0] += a[i]; return hashmod(t, a[0]); |