[JSCRIPT] Sync with Wine Staging 1.9.4. CORE-10912
[reactos.git] / reactos / dll / win32 / jscript / number.c
index cebcc9f..a5f6e65 100644 (file)
@@ -247,7 +247,7 @@ static HRESULT Number_toString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, u
 
     val = number->value;
 
-    if(radix==10 || isnan(val) || isinf(val)) {
+    if(radix==10 || !is_finite(val)) {
         hres = to_string(ctx, jsval_number(val), &str);
         if(FAILED(hres))
             return hres;
@@ -373,7 +373,7 @@ static HRESULT Number_toFixed(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, un
     }
 
     val = number->value;
-    if(isinf(val) || isnan(val)) {
+    if(!is_finite(val)) {
         hres = to_string(ctx, jsval_number(val), &str);
         if(FAILED(hres))
             return hres;
@@ -414,7 +414,7 @@ static HRESULT Number_toExponential(script_ctx_t *ctx, vdisp_t *jsthis, WORD fla
     }
 
     val = number->value;
-    if(isinf(val) || isnan(val)) {
+    if(!is_finite(val)) {
         hres = to_string(ctx, jsval_number(val), &str);
         if(FAILED(hres))
             return hres;
@@ -455,7 +455,7 @@ static HRESULT Number_toPrecision(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags
     }
 
     val = number->value;
-    if(isinf(val) || isnan(val) || !prec) {
+    if(!is_finite(val) || !prec) {
         hres = to_string(ctx, jsval_number(val), &str);
         if(FAILED(hres))
             return hres;