mirror of
https://github.com/UberGames/ioef.git
synced 2024-12-01 00:21:19 +00:00
This commit is contained in:
parent
d563deba76
commit
01d7eaddf5
1 changed files with 4 additions and 6 deletions
|
@ -917,12 +917,10 @@ double strtod( const char *nptr, const char **endptr )
|
||||||
if( Q_stricmpn( nptr, "nan", 3 ) == 0 )
|
if( Q_stricmpn( nptr, "nan", 3 ) == 0 )
|
||||||
{
|
{
|
||||||
floatint_t nan;
|
floatint_t nan;
|
||||||
if( endptr == NULL )
|
|
||||||
{
|
if( endptr )
|
||||||
nan.ui = 0x7fffffff;
|
|
||||||
return nan.f;
|
|
||||||
}
|
|
||||||
*endptr = &nptr[3];
|
*endptr = &nptr[3];
|
||||||
|
|
||||||
// nan can be followed by a bracketed number (in hex, octal,
|
// nan can be followed by a bracketed number (in hex, octal,
|
||||||
// or decimal) which is then put in the mantissa
|
// or decimal) which is then put in the mantissa
|
||||||
// this can be used to generate signalling or quiet NaNs, for
|
// this can be used to generate signalling or quiet NaNs, for
|
||||||
|
|
Loading…
Reference in a new issue