Have FromString report failure when it read NaN or INF.

This commit is contained in:
Steve Checkoway
2006-06-12 07:58:54 +00:00
parent 2992fa865a
commit 4dbf1d44ae
+1 -1
View File
@@ -1905,7 +1905,7 @@ bool FromString( const RString &sValue, float &out )
{
const char *endptr = sValue.data() + sValue.size();
out = strtof( sValue, (char **) &endptr );
return endptr != sValue.data();
return endptr != sValue.data() && isfinite( out );
}
bool FromString( const RString &sValue, bool &out )