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 fb8423fdca
commit 91dea9cbc4

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()) {