diff --git a/src/core/PasswordGenerator.cpp b/src/core/PasswordGenerator.cpp index 01641bc802..aa0f3e7172 100644 --- a/src/core/PasswordGenerator.cpp +++ b/src/core/PasswordGenerator.cpp @@ -261,8 +261,10 @@ QVector PasswordGenerator::passwordGroups() const if (!m_custom.isEmpty()) { PasswordGroup group; - for (auto ch : m_custom) { - group.append(ch); + for (const auto& ch : m_custom) { + if (!group.contains(ch)) { + group.append(ch); + } } passwordGroups.append(group);