From d20b89cf93f5d670d3be0fae78be93c6ad866799 Mon Sep 17 00:00:00 2001 From: Alex Henrie Date: Tue, 1 Aug 2017 00:13:35 -0600 Subject: [PATCH] msvcrt: Don't set errno in sqrt(f) if x is positive infinity. Signed-off-by: Alex Henrie Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- 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 2001d44a0b4..c141feadff4 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -279,7 +279,7 @@ float CDECL MSVCRT_sinhf( float x ) */ float CDECL MSVCRT_sqrtf( float x ) { - if (x < 0.0 || !finitef(x)) *MSVCRT__errno() = MSVCRT_EDOM; + if (x < 0.0) *MSVCRT__errno() = MSVCRT_EDOM; return sqrtf(x); } @@ -476,7 +476,7 @@ double CDECL MSVCRT_sinh( double x ) */ double CDECL MSVCRT_sqrt( double x ) { - if (x < 0.0 || !isfinite(x)) *MSVCRT__errno() = MSVCRT_EDOM; + if (x < 0.0) *MSVCRT__errno() = MSVCRT_EDOM; return sqrt(x); } -- 2.11.4.GIT