[PATCH 3/4] msvcrt: Don't set errno in _logb(f) if x is ±INF.
Alex Henrie
alexhenrie24 at gmail.com
Thu Jul 27 03:26:24 CDT 2017
This behavior appears to be consistent across all versions of MSVC.
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
dlls/msvcrt/math.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index 2433376427..82f56caaa6 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -141,7 +141,7 @@ INT CDECL MSVCRT__isnanf( float num )
*/
float CDECL MSVCRT__logbf( float num )
{
- if (!finitef(num)) *MSVCRT__errno() = MSVCRT_EDOM;
+ if (isnanf(num)) *MSVCRT__errno() = MSVCRT_EDOM;
else if (!num) *MSVCRT__errno() = MSVCRT_ERANGE;
return logbf(num);
}
@@ -789,7 +789,7 @@ __int64 CDECL _abs64( __int64 n )
*/
double CDECL MSVCRT__logb(double num)
{
- if (!isfinite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
+ if (isnan(num)) *MSVCRT__errno() = MSVCRT_EDOM;
else if (!num) *MSVCRT__errno() = MSVCRT_ERANGE;
return logb(num);
}
--
2.13.3
More information about the wine-patches
mailing list