forked from qt-creator/qt-creator
Todo: Fix crash on MSVC when chars >0x7f are read
Change-Id: I919c1d795f846b9a16c4428f7d2cd91be7e04c75 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
c2e5f1c819
commit
2835fb0308
@@ -96,9 +96,9 @@ void CppTodoItemsScanner::processDocument(CPlusPlus::Document::Ptr doc)
|
||||
|
||||
const char *start = source.constData() + from;
|
||||
const char *end = source.constData() + to;
|
||||
while (start != end && std::isspace(*start))
|
||||
while (start != end && std::isspace((unsigned char)*start))
|
||||
++start;
|
||||
while (start != end && std::isspace(*end))
|
||||
while (start != end && std::isspace((unsigned char)*end))
|
||||
--end;
|
||||
const int length = end - start + 1;
|
||||
if (length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user