mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-21 04:28:26 -04:00
Fix KeePass2Repair to retain multi-byte UTF-8 chars.
Since char is (often) unsigned the ch < 0x20 check matched all multi-byte encoded UTF-8 chars.
This commit is contained in:
parent
8a92cec03f
commit
208b803fbe
3 changed files with 3 additions and 3 deletions
|
@ -66,7 +66,7 @@ KeePass2Repair::RepairResult KeePass2Repair::repairDatabase(QIODevice* device, c
|
|||
|
||||
// try to fix broken databases because of bug #392
|
||||
for (int i = (xmlData.size() - 1); i >= 0; i--) {
|
||||
char ch = xmlData.at(i);
|
||||
quint8 ch = static_cast<quint8>(xmlData.at(i));
|
||||
if (ch < 0x20 && ch != 0x09 && ch != 0x0A && ch != 0x0D) {
|
||||
xmlData.remove(i, 1);
|
||||
repairAction = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue