From 25a1061700415601236977eeacf458dbb18ea5e2 Mon Sep 17 00:00:00 2001 From: Tixx <83774803+WiserTixx@users.noreply.github.com> Date: Thu, 1 May 2025 20:42:01 +0200 Subject: [PATCH] Verify mod hash after downloading --- src/Network/Resources.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Network/Resources.cpp b/src/Network/Resources.cpp index 99c75b3..316c426 100644 --- a/src/Network/Resources.cpp +++ b/src/Network/Resources.cpp @@ -571,11 +571,16 @@ void NewSyncResources(SOCKET Sock, const std::string& Mods, const std::vectorHash) { + error("Failed to write or download the entire file '" + PathToSaveTo + "' correctly (hash mismatch)"); + Terminate = true; + } } while (fs::file_size(PathToSaveTo) != ModInfoIter->FileSize && !Terminate); if (!Terminate) { if (!fs::exists(GetGamePath() + "mods/multiplayer")) {