initialComponents is unsigned, so can't -1 from it; just return if the components list is empty

BUG:227118

svn path=/trunk/KDE/kdelibs/; revision=1090799
This commit is contained in:
Aaron J. Seigo 2010-02-16 02:36:28 +00:00
parent 8b550a13ad
commit 32683cd664

View File

@ -128,6 +128,10 @@ bool correctPathCase(const QString& path, QString &corrected)
components.pop_back();
}
if (components.isEmpty()) {
return true;
}
QString correctPath;
const unsigned initialComponents = components.size();
for (unsigned i = 0; i < initialComponents - 1; i ++) {