From: Roberto Raggi Date: Tue, 16 Aug 2011 14:52:50 +0000 (+0200) Subject: Fix the computation of the start token position. X-Git-Tag: qt-v5.0.0-alpha1~1802 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ce00d7cf44060999e0123256977726d2272e0e10;p=profile%2Fivi%2Fqtdeclarative.git Fix the computation of the start token position. Rewind the buffer pointer only when necessary. Change-Id: Idd78edc068b1c55d79c5674facd9c55270e536a8 Reviewed-on: http://codereview.qt.nokia.com/3787 Reviewed-by: Roberto Raggi --- diff --git a/src/declarative/qml/parser/qdeclarativejslexer.cpp b/src/declarative/qml/parser/qdeclarativejslexer.cpp index 0d84284..c269542 100644 --- a/src/declarative/qml/parser/qdeclarativejslexer.cpp +++ b/src/declarative/qml/parser/qdeclarativejslexer.cpp @@ -723,11 +723,13 @@ again: } if (n != QLatin1Char('.') && n != QLatin1Char('e') && n != QLatin1Char('E')) { - _codePtr = code - 1; - scanChar(); + if (code != _codePtr) { + _codePtr = code - 1; + scanChar(); + } _tokenValue = integer; return T_NUMERIC_LITERAL; - } + } } QVarLengthArray chars;