Fix ambiguous types on some systems

This commit is contained in:
Victor Tran 2019-10-13 06:29:57 +11:00
parent e0b1ffe607
commit fe486acfe6
No known key found for this signature in database
GPG key ID: FBA10B22D602BAC1

View file

@ -52,7 +52,7 @@ bool setMousePassword(QString mousePassword, QString passwordFile) {
const char* saltCharacters = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
for (int i = 0; i < 8; i++) {
salt.append(saltCharacters[QRandomGenerator::securelySeeded().bounded(0, strlen(saltCharacters))]);
salt.append(saltCharacters[QRandomGenerator::securelySeeded().bounded(quint32(0), static_cast<quint32>(strlen(saltCharacters)))]);
}
QString hashedPassword = QString::fromLocal8Bit(crypt(mousePassword.toLocal8Bit().data(), salt.data()));