diff --git a/src/tools/clangbackend/source/sourcelocation.cpp b/src/tools/clangbackend/source/sourcelocation.cpp index 7fbe8c03eb9..965bd251294 100644 --- a/src/tools/clangbackend/source/sourcelocation.cpp +++ b/src/tools/clangbackend/source/sourcelocation.cpp @@ -102,7 +102,7 @@ SourceLocation::SourceLocation(CXTranslationUnit cxTranslationUnit, // (2) column in Clang is the utf8 byte offset from the beginning of the line. // Here we convert column from (2) to (1). column_ = static_cast(QString::fromUtf8(&contents[lineStart], - static_cast(column_)).size()); + static_cast(column_) - 1).size()) + 1; } }