Use strict check for std::sort to prevent recursion

* Fixes #5596
This commit is contained in:
Jonathan White 2020-11-01 08:20:40 -05:00
parent 7ac651763c
commit 30989e35bf

View File

@ -745,7 +745,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()) {