Fix parsing of numeric literals.
authorRoberto Raggi <roberto.raggi@nokia.com>
Wed, 17 Aug 2011 12:27:37 +0000 (14:27 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 30 Aug 2011 11:18:28 +0000 (13:18 +0200)
Store the value in a double.

Change-Id: I17b90d2917a2710d434a92b5f6b297f755156c31
Reviewed-on: http://codereview.qt.nokia.com/3788
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
src/declarative/qml/parser/qdeclarativejslexer.cpp

index c269542..b59d7cd 100644 (file)
@@ -713,7 +713,7 @@ again:
             }
         } else if (QDeclarativeUtils::isDigit(ch)) {
             if (ch != QLatin1Char('0')) {
-                int integer = ch.unicode() - '0';
+                double integer = ch.unicode() - '0';
 
                 QChar n = _char;
                 const QChar *code = _codePtr;