mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 23:11:58 +00:00
- reverted the clamping when assigning to FScanner::Number.
This broke unsigned integer parsing without explicitly declaring the constant unsigned.
This commit is contained in:
parent
847cbcc0c3
commit
26784d7453
1 changed files with 4 additions and 4 deletions
|
@ -600,13 +600,13 @@ bool FScanner::GetToken ()
|
|||
{
|
||||
TokenType = TK_UIntConst;
|
||||
BigNumber = (int64_t)strtoull(String, &stopper, 0);
|
||||
Number = (int)clamp<int64_t>(BigNumber, 0, UINT_MAX);
|
||||
Number = (int)BigNumber;// clamp<int64_t>(BigNumber, 0, UINT_MAX);
|
||||
Float = (unsigned)Number;
|
||||
}
|
||||
else
|
||||
{
|
||||
BigNumber = strtoll(String, &stopper, 0);
|
||||
Number = (int)clamp<int64_t>(BigNumber, INT_MIN, INT_MAX);
|
||||
Number = (int)BigNumber;// clamp<int64_t>(BigNumber, 0, UINT_MAX);
|
||||
Float = Number;
|
||||
}
|
||||
}
|
||||
|
@ -708,7 +708,7 @@ bool FScanner::GetNumber ()
|
|||
else
|
||||
{
|
||||
BigNumber = strtoll(String, &stopper, 0);
|
||||
Number = (int)clamp<int64_t>(BigNumber, INT_MIN, INT_MAX);
|
||||
Number = (int)BigNumber;// clamp<int64_t>(BigNumber, 0, UINT_MAX);
|
||||
if (*stopper != 0)
|
||||
{
|
||||
ScriptError ("SC_GetNumber: Bad numeric constant \"%s\".", String);
|
||||
|
@ -765,7 +765,7 @@ bool FScanner::CheckNumber ()
|
|||
else
|
||||
{
|
||||
BigNumber = strtoll (String, &stopper, 0);
|
||||
Number = (int)clamp<int64_t>(BigNumber, INT_MIN, INT_MAX);
|
||||
Number = (int)BigNumber;// clamp<int64_t>(BigNumber, 0, UINT_MAX);
|
||||
if (*stopper != 0)
|
||||
{
|
||||
UnGet();
|
||||
|
|
Loading…
Reference in a new issue