Alex Henrie : msvcrt: Set errno in _logb(f) if x is 0.

Alexandre Julliard julliard at winehq.org
Mon Jul 31 15:06:29 CDT 2017


Module: wine
Branch: master
Commit: 9e3b3c9bac63fba8396d788ac93197f82e392a8d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9e3b3c9bac63fba8396d788ac93197f82e392a8d

Author: Alex Henrie <alexhenrie24 at gmail.com>
Date:   Thu Jul 27 02:26:23 2017 -0600

msvcrt: Set errno in _logb(f) if x is 0.

Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcrt/math.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index 1d61396..2433376 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -142,6 +142,7 @@ INT CDECL MSVCRT__isnanf( float num )
 float CDECL MSVCRT__logbf( float num )
 {
     if (!finitef(num)) *MSVCRT__errno() = MSVCRT_EDOM;
+    else if (!num) *MSVCRT__errno() = MSVCRT_ERANGE;
     return logbf(num);
 }
 
@@ -789,6 +790,7 @@ __int64 CDECL _abs64( __int64 n )
 double CDECL MSVCRT__logb(double num)
 {
   if (!isfinite(num)) *MSVCRT__errno() = MSVCRT_EDOM;
+  else if (!num) *MSVCRT__errno() = MSVCRT_ERANGE;
   return logb(num);
 }
 




More information about the wine-cvs mailing list