Skip to content

Commit 04e44cb

Browse files
committed
Another addendum to
60ae4c3 Added more tolerance
1 parent a1cd502 commit 04e44cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Shared/sdk/CScriptArgReader.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Multi Theft Auto is available from http://www.multitheftauto.com/
1010
*
1111
*****************************************************************************/
12-
12+
#include <limits>
1313

1414
/////////////////////////////////////////////////////////////////////////
1515
//
@@ -56,7 +56,7 @@ class CScriptArgReader
5656
return;
5757
}
5858

59-
if ( std::is_unsigned < T > () && number < 0.0 )
59+
if ( std::is_unsigned < T > () && number < -FLT_EPSILON )
6060
{
6161
SetCustomError ( "Expected positive value, got negative", "Bad argument" );
6262
return;
@@ -88,7 +88,7 @@ class CScriptArgReader
8888
return;
8989
}
9090

91-
if ( std::is_unsigned < T > () && number < 0.0 )
91+
if ( std::is_unsigned < T > () && number < -FLT_EPSILON )
9292
{
9393
SetCustomError ( "Expected positive value, got negative", "Bad argument" );
9494
return;

0 commit comments

Comments
 (0)