File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,8 @@ class CScriptArgReader
77
77
{
78
78
if (checkSign && number < -FLT_EPSILON)
79
79
{
80
- SetCustomWarning (" Expected positive value, got negative. This warning may be an error in future versions." );
80
+ SetCustomError (" Expected positive value, got negative" , " Bad argument" );
81
+ return ;
81
82
}
82
83
outValue = static_cast <T>(static_cast <int64_t >(number));
83
84
return ;
@@ -120,7 +121,8 @@ class CScriptArgReader
120
121
121
122
if (checkSign && std::is_unsigned<T>() && number < -FLT_EPSILON)
122
123
{
123
- SetCustomWarning (" Expected positive value, got negative. This warning may be an error in future versions." );
124
+ SetCustomError (" Expected positive value, got negative" , " Bad argument" );
125
+ return ;
124
126
}
125
127
126
128
outValue = static_cast <T>(number);
You can’t perform that action at this time.
0 commit comments