1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-17 20:58:07 +02:00

error handling

This commit is contained in:
Laserlicht 2024-12-02 01:09:50 +01:00
parent be2338739b
commit 0141522a60

View File

@ -106,6 +106,8 @@ QString Innoextract::getHashError(QString exeFile, QString binFile)
QCryptographicHash hash(QCryptographicHash::Algorithm::Sha1);
if(hash.addData(&exe))
exeHash = hash.result().toHex().toLower().toStdString();
else
return QString{}; // error with hashing
exeSize = exe.size();
}
else
@ -117,6 +119,8 @@ QString Innoextract::getHashError(QString exeFile, QString binFile)
QCryptographicHash hash(QCryptographicHash::Algorithm::Sha1);
if(hash.addData(&bin))
binHash = hash.result().toHex().toLower().toStdString();
else
return QString{}; // error with hashing
binSize = bin.size();
}
else