fix crash for std::numeric_limits<int>::min() in our math lib impl
This commit is contained in:
parent
ab125155cf
commit
49bb030e9b
1 changed files with 3 additions and 1 deletions
|
@ -59,7 +59,9 @@ static double getN10Exp( int nExp )
|
||||||
{
|
{
|
||||||
if ( nExp < 0 )
|
if ( nExp < 0 )
|
||||||
{
|
{
|
||||||
if ( -nExp <= n10Count )
|
// && -nExp > 0 necessary for std::numeric_limits<int>::min()
|
||||||
|
// because -nExp = nExp
|
||||||
|
if ( -nExp <= n10Count && -nExp > 0 )
|
||||||
return n10s[1][-nExp-1];
|
return n10s[1][-nExp-1];
|
||||||
else
|
else
|
||||||
return pow( 10.0, static_cast<double>( nExp ) );
|
return pow( 10.0, static_cast<double>( nExp ) );
|
||||||
|
|
Loading…
Reference in a new issue