(Not part of Communicator build.)

Handle NaNs better for non-PC platforms as well.
This commit is contained in:
norris 1998-06-29 22:00:11 +00:00
parent db1bf85ee6
commit 98f610114f

View File

@ -114,11 +114,11 @@ js_compare_atom_keys(const void *k1, const void *k2)
if (JSVAL_IS_DOUBLE(v1) && JSVAL_IS_DOUBLE(v2)) {
double d1 = *JSVAL_TO_DOUBLE(v1);
double d2 = *JSVAL_TO_DOUBLE(v2);
#ifdef XP_PC
/* XXX MSVC miscompiles such that (NaN == 0) */
if (JSDOUBLE_IS_NaN(d1))
return JSDOUBLE_IS_NaN(d2);
else if (JSDOUBLE_IS_NaN(d2))
#ifdef XP_PC
/* XXX MSVC miscompiles such that (NaN == 0) */
if (JSDOUBLE_IS_NaN(d2))
return JS_FALSE;
#endif
return d1 == d2;