Jacek Caban : jscript: Use quiet NaNs in jsval.
Alexandre Julliard
julliard at winehq.org
Mon Apr 5 16:28:25 CDT 2021
Module: wine
Branch: master
Commit: d9a4392d6bbd50b0a9690aa20fe7baa199f38d96
URL: https://source.winehq.org/git/wine.git/?a=commit;h=d9a4392d6bbd50b0a9690aa20fe7baa199f38d96
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Apr 5 20:40:42 2021 +0200
jscript: Use quiet NaNs in jsval.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50845
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/jscript/jsval.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/jscript/jsval.h b/dlls/jscript/jsval.h
index 963f59f6a08..9f451b12831 100644
--- a/dlls/jscript/jsval.h
+++ b/dlls/jscript/jsval.h
@@ -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
More information about the wine-cvs
mailing list