mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 14:58:10 -05:00
Correctly parse binary operations that can be interpreted as sign prefixes for numbers
This commit is contained in:
@ -119,10 +119,11 @@ CommandsParserValue CommandsLexer::GetNextToken()
|
||||
if (isdigit(c))
|
||||
{
|
||||
bool isFloatingPointValue;
|
||||
bool hasSignPrefix;
|
||||
double doubleValue;
|
||||
int integerValue;
|
||||
|
||||
ReadNumber(isFloatingPointValue, doubleValue, integerValue);
|
||||
ReadNumber(isFloatingPointValue, hasSignPrefix, doubleValue, integerValue);
|
||||
|
||||
if (isFloatingPointValue)
|
||||
return CommandsParserValue::FloatingPoint(pos, doubleValue);
|
||||
|
@ -138,10 +138,11 @@ HeaderParserValue HeaderLexer::GetNextToken()
|
||||
if(isdigit(c))
|
||||
{
|
||||
bool isFloatingPointValue;
|
||||
bool hasSignPrefix;
|
||||
double doubleValue;
|
||||
int integerValue;
|
||||
|
||||
ReadNumber(isFloatingPointValue, doubleValue, integerValue);
|
||||
ReadNumber(isFloatingPointValue, hasSignPrefix, doubleValue, integerValue);
|
||||
|
||||
if (isFloatingPointValue)
|
||||
return HeaderParserValue::FloatingPoint(pos, doubleValue);
|
||||
|
Reference in New Issue
Block a user