1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-29 09:29:10 +00:00

Fix: Signature validation did not close its file. (#12479)

This commit is contained in:
2024-04-11 14:37:29 +01:00
committed by Loïc Guilloux
parent 3425aeac85
commit 11e6d2e3d4

View File

@@ -205,6 +205,7 @@ static bool _ValidateSignatureFile(const std::string &filename)
std::string text(filesize, '\0');
size_t len = fread(text.data(), filesize, 1, f);
FioFCloseFile(f);
if (len != 1) {
Debug(misc, 0, "Failed to validate signature: failed to read file: {}", filename);
return false;