diff options
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qstring.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index e5e2376888..5d250df99c 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -695,6 +695,8 @@ static int qt_compare_strings(QStringView lhs, QLatin1String rhs, Qt::CaseSensit static int qt_compare_strings(QLatin1String lhs, QLatin1String rhs, Qt::CaseSensitivity cs) Q_DECL_NOTHROW { + if (lhs.isEmpty()) + return lencmp(0, rhs.size()); const auto l = std::min(lhs.size(), rhs.size()); int r; if (cs == Qt::CaseSensitive) |