jscript: Use quiet NaNs in jsval.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50845 Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
73276d797c
commit
d9a4392d6b
|
@ -35,8 +35,8 @@
|
|||
#endif
|
||||
|
||||
#ifdef JSVAL_DOUBLE_LAYOUT_PTR32
|
||||
/* NaN exponent and our 0x80000 marker */
|
||||
#define JSV_VAL(x) (0x7ff80000|x)
|
||||
/* NaN exponent, quiet bit 0x80000 and our 0x10000 marker */
|
||||
#define JSV_VAL(x) (0x7ff90000|x)
|
||||
#else
|
||||
#define JSV_VAL(x) x
|
||||
#endif
|
||||
|
@ -150,10 +150,10 @@ static inline jsval_t jsval_number(double n)
|
|||
if((ret.u.s.tag & 0x7ff00000) == 0x7ff00000) {
|
||||
/* isinf */
|
||||
if(ret.u.s.tag & 0xfffff) {
|
||||
ret.u.s.tag = 0x7ff00000;
|
||||
ret.u.s.tag = 0x7ff80000;
|
||||
ret.u.s.u.as_uintptr = ~0;
|
||||
}else if(ret.u.s.u.as_uintptr) {
|
||||
ret.u.s.tag = 0x7ff00000;
|
||||
ret.u.s.tag = 0x7ff80000;
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
@ -191,7 +191,7 @@ static inline BOOL is_string(jsval_t v)
|
|||
static inline BOOL is_number(jsval_t v)
|
||||
{
|
||||
#ifdef JSVAL_DOUBLE_LAYOUT_PTR32
|
||||
return (v.u.s.tag & 0x7ff80000) != 0x7ff80000;
|
||||
return (v.u.s.tag & 0x7ff10000) != 0x7ff10000;
|
||||
#else
|
||||
return v.type == JSV_NUMBER;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue