Remove octal in expressions when there's a leading zero

This commit is contained in:
Benjamin Nauck
2024-10-29 23:22:41 +01:00
committed by Chris Hennes
parent 4bdb104bed
commit 19fa91253f
2 changed files with 2 additions and 2 deletions

View File

@@ -340,7 +340,7 @@ EXPO [eE][-+]?[0-9]+
{DIGIT}*","{DIGIT}+{EXPO}? COUNTCHARS; yylval.fvalue = num_change(yytext,',','.'); return yylval.fvalue == 1 ? ONE : NUM;
{DIGIT}+{EXPO} COUNTCHARS; yylval.fvalue = num_change(yytext,',','.'); return yylval.fvalue == 1 ? ONE : NUM;
{DIGIT}+ { COUNTCHARS;
yylval.ivalue = strtoll( yytext, NULL, 0 );
yylval.ivalue = strtoll( yytext, NULL, 10 );
if (yylval.ivalue == LLONG_MIN)
throw Base::UnderflowError("Integer underflow");
else if (yylval.ivalue == LLONG_MAX)

View File

@@ -9572,7 +9572,7 @@ case 137:
YY_RULE_SETUP
#line 342 "ExpressionParser.l"
{ COUNTCHARS;
yylval.ivalue = strtoll( yytext, NULL, 0 );
yylval.ivalue = strtoll( yytext, NULL, 10 );
if (yylval.ivalue == LLONG_MIN)
throw Base::UnderflowError("Integer underflow");
else if (yylval.ivalue == LLONG_MAX)