summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorCasper van Donderen <casper.vandonderen@nokia.com>2011-09-02 12:50:12 (GMT)
committerCasper van Donderen <casper.vandonderen@nokia.com>2011-09-02 12:50:12 (GMT)
commit220048de8130bbe6059af0a05c7328ae0048bf42 (patch)
treeef95e909ff455d191211b14c1b59ffe8f6ae208b /tools
parent8bb4d82aea6a8dda91d29351fed4ef2c332cbec4 (diff)
downloadQt-220048de8130bbe6059af0a05c7328ae0048bf42.zip
Qt-220048de8130bbe6059af0a05c7328ae0048bf42.tar.gz
Qt-220048de8130bbe6059af0a05c7328ae0048bf42.tar.bz2
Fix assert error on Windows with a negative char.
Reviewed-by: Denis Dzyubenko Fixes: QTBUG-20228
Diffstat (limited to 'tools')
-rw-r--r--tools/qdoc3/cppcodemarker.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp
index 2067716..9af7b9e 100644
--- a/tools/qdoc3/cppcodemarker.cpp
+++ b/tools/qdoc3/cppcodemarker.cpp
@@ -947,13 +947,13 @@ QString CppCodeMarker::addMarkUp(const QString &in,
QString tag;
bool target = false;
- if (isalpha(ch) || ch == '_') {
+ if (isalpha((unsigned char) ch) || ch == '_') {
QString ident;
do {
ident += ch;
finish = i;
readChar();
- } while (ch >= 0 && isalnum(ch) || ch == '_');
+ } while (isalnum((unsigned char) ch) || ch == '_');
if (classRegExp.exactMatch(ident)) {
tag = QLatin1String("type");
@@ -970,11 +970,11 @@ QString CppCodeMarker::addMarkUp(const QString &in,
tag = QLatin1String("func");
target = true;
}
- } else if (isdigit(ch)) {
+ } else if (isdigit((unsigned char) ch)) {
do {
finish = i;
readChar();
- } while (isalnum(ch) || ch == '.');
+ } while (isalnum((unsigned char) ch) || ch == '.');
tag = QLatin1String("number");
} else {
switch (ch) {