Use strict check for std::sort to prevent recursion

* Fixes #5596
This commit is contained in:
Jonathan White committed 2020-11-01 13:28:59 -05:00
1 parent fb8423fdca
commit 91dea9cbc4
1 file changed
+1 -1
+1 -1
View File
@@ -751,7 +751,7 @@ BrowserService::sortEntries(QList<Entry*>& pwEntries, const QString& siteUrlStr,
// Sort same priority entries by Title or UserName
auto entries = priorities.values(key);
std::sort(entries.begin(), entries.end(), [&sortField](Entry* left, Entry* right) {
return QString::localeAwareCompare(left->attribute(sortField), right->attribute(sortField));
return QString::localeAwareCompare(left->attribute(sortField), right->attribute(sortField)) < 0;
});
results << entries;
if (browserSettings()->bestMatchOnly() && !results.isEmpty()) {