We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 22cb38b commit eeebf5bCopy full SHA for eeebf5b
src/core/qgsexpressionlexer.ll
@@ -155,7 +155,18 @@ string "'"{str_char}*"'"
155
"," { return COMMA; }
156
157
{num_float} { exp_lval.numberFloat = cLocale.toDouble( QString::fromAscii(yytext) ); return NUMBER_FLOAT; }
158
-{num_int} { exp_lval.numberInt = cLocale.toInt( QString::fromAscii(yytext), 0, 10); return NUMBER_INT; }
+{num_int} {
159
+ bool ok;
160
+ exp_lval.numberInt = cLocale.toInt( QString::fromAscii(yytext), &ok, 10 );
161
+ if( ok )
162
+ return NUMBER_INT;
163
+
164
+ exp_lval.numberFloat = cLocale.toDouble( QString::fromAscii(yytext), &ok );
165
166
+ return NUMBER_FLOAT;
167
168
+ return Unknown_CHARACTER;
169
+}
170
171
{string} { TEXT_FILTER(stripText); return STRING; }
172
0 commit comments