Skip to content

Commit

Permalink
Use strict check for std::sort to prevent recursion
Browse files Browse the repository at this point in the history
  • Loading branch information
droidmonkey committed Nov 1, 2020
1 parent fb8423f commit 91dea9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/browser/BrowserService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit 91dea9c

Please sign in to comment.