From 01d7eaddf5811ce7609b48492f9dec6907b4c92b Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Fri, 4 Feb 2011 15:07:32 +0000 Subject: [PATCH] https://bugzilla.icculus.org/show_bug.cgi?id=4576 --- code/game/bg_lib.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/code/game/bg_lib.c b/code/game/bg_lib.c index e1e9e9e8..f363dbc2 100644 --- a/code/game/bg_lib.c +++ b/code/game/bg_lib.c @@ -917,12 +917,10 @@ double strtod( const char *nptr, const char **endptr ) if( Q_stricmpn( nptr, "nan", 3 ) == 0 ) { floatint_t nan; - if( endptr == NULL ) - { - nan.ui = 0x7fffffff; - return nan.f; - } - *endptr = &nptr[3]; + + if( endptr ) + *endptr = &nptr[3]; + // nan can be followed by a bracketed number (in hex, octal, // or decimal) which is then put in the mantissa // this can be used to generate signalling or quiet NaNs, for