diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2011-08-10 12:16:25 +0200 |
---|---|---|
committer | Christian Kamm <christian.d.kamm@nokia.com> | 2011-08-10 14:37:17 +0200 |
commit | 01bb7443fdb848899fef41e9f661a455e2e6e4ee (patch) | |
tree | acc204594c3ee785c5d7263ddc5f52b5073be1d2 /src/libs/cplusplus/CppDocument.cpp | |
parent | 476338a6d21377f653f24942bb955e8a6cb83c84 (diff) | |
download | qt-creator-01bb7443fdb848899fef41e9f661a455e2e6e4ee.tar.gz |
C++: Fix off-by-one in scopeAt.
The only Scope that set the end offset to *before* the last token
was ObjCClassDeclaration.
Change-Id: Icbdb5bcdd72d96087ac586ad51510fed74a633eb
Reviewed-on: http://codereview.qt.nokia.com/2820
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
Diffstat (limited to 'src/libs/cplusplus/CppDocument.cpp')
-rw-r--r-- | src/libs/cplusplus/CppDocument.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/cplusplus/CppDocument.cpp b/src/libs/cplusplus/CppDocument.cpp index c5a714f48c..4c5fa48ed7 100644 --- a/src/libs/cplusplus/CppDocument.cpp +++ b/src/libs/cplusplus/CppDocument.cpp @@ -142,7 +142,7 @@ protected: unsigned endLine, endColumn; _unit->getPosition(scope->endOffset(), &endLine, &endColumn); - if (_line < endLine || (_line == endLine && _column <= endColumn)) + if (_line < endLine || (_line == endLine && _column < endColumn)) _scope = scope; } } |