1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix clearing duplicate passwords

fixes dubslow/qTox#2
This commit is contained in:
Dubslow 2014-12-09 19:06:09 -06:00
parent 09602731f7
commit a1a1a6f989
No known key found for this signature in database
GPG Key ID: 3DB8E05315C220AA

View File

@ -59,12 +59,12 @@ void Core::useOtherPassword(PasswordType type)
void Core::clearPassword(PasswordType passtype)
{
if (pwsaltedkeys[passtype])
{
PasswordType other = (passtype == ptMain) ? ptHistory : ptMain;
if (pwsaltedkeys[passtype] == pwsaltedkeys[other])
pwsaltedkeys[other] = nullptr;
delete[] pwsaltedkeys[passtype];
pwsaltedkeys[passtype] = nullptr;
}
}
QByteArray Core::encryptData(const QByteArray& data, PasswordType passtype)
{