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

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alex Henrie 2017-07-27 02:26:23 -06:00 committed by Alexandre Julliard
parent f9e995de42
commit 9e3b3c9bac
1 changed files with 2 additions and 0 deletions

View File

@ -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);
}