summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qurl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index f975fb4e43..3e711b12ec 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -777,7 +777,7 @@ void QUrlPrivate::setUserInfo(const QString &userInfo, int from, int end)
int delimIndex = userInfo.indexOf(QLatin1Char(':'), from);
setUserName(userInfo, from, qMin<uint>(delimIndex, end));
- if (delimIndex == -1) {
+ if (uint(delimIndex) >= uint(end)) {
password.clear();
sectionIsPresent &= ~Password;
sectionHasError &= ~Password;