Alex Henrie : msvcrt: Don't set errno in sqrt(f) if x is positive infinity.
Module: wine Branch: master Commit: d20b89cf93f5d670d3be0fae78be93c6ad866799 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d20b89cf93f5d670d3be0fae78... Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Tue Aug 1 00:13:35 2017 -0600 msvcrt: Don't set errno in sqrt(f) if x is positive infinity. Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- 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 2001d44..c141fea 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); }
participants (1)
-
Alexandre Julliard