From 1a6a78171adaaf2f4bb7f4668533ccc2c06f6db4 Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Sat, 20 Oct 2018 17:06:14 +0200 Subject: qdir: Fix a condition typo A part of conditional expression is always false: if "c > 'z'" Task-number: QTBUG-71156 Change-Id: I6ee20c45d80e476d97e59167c481b157e4a233d0 Reviewed-by: Mikhail Svetkin Reviewed-by: Thiago Macieira --- src/corelib/io/qdir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/io/qdir.cpp') diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index 39422c3401..75fd0f8e0a 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -74,7 +74,7 @@ static QString driveSpec(const QString &path) if (path.size() < 2) return QString(); char c = path.at(0).toLatin1(); - if (c < 'a' && c > 'z' && c < 'A' && c > 'Z') + if ((c < 'a' || c > 'z') && (c < 'A' || c > 'Z')) return QString(); if (path.at(1).toLatin1() != ':') return QString(); -- cgit v1.2.3