From 80f1367d9a6dfddbcdb33abb94568312d338ddfc Mon Sep 17 00:00:00 2001 From: Glavo Date: Sun, 10 Aug 2025 15:39:13 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20#4233:=20=E4=BF=AE=E5=A4=8D=20RemoteMod::?= =?UTF-8?q?getIntegrityCheck=20=E6=9C=AA=E9=80=89=E6=8B=A9=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E7=9A=84=E7=AE=97=E6=B3=95=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#4238)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/jackhuang/hmcl/mod/RemoteMod.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/mod/RemoteMod.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/mod/RemoteMod.java index 9542cbecd..a936f887b 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/mod/RemoteMod.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/mod/RemoteMod.java @@ -300,11 +300,13 @@ public final class RemoteMod { public FileDownloadTask.IntegrityCheck getIntegrityCheck() { if (hashes.containsKey("md5")) { - return new FileDownloadTask.IntegrityCheck("MD5", hashes.get("sha1")); + return new FileDownloadTask.IntegrityCheck("MD5", hashes.get("md5")); } else if (hashes.containsKey("sha1")) { return new FileDownloadTask.IntegrityCheck("SHA-1", hashes.get("sha1")); + } else if (hashes.containsKey("sha256")) { + return new FileDownloadTask.IntegrityCheck("SHA-256", hashes.get("sha256")); } else if (hashes.containsKey("sha512")) { - return new FileDownloadTask.IntegrityCheck("SHA-256", hashes.get("sha1")); + return new FileDownloadTask.IntegrityCheck("SHA-512", hashes.get("sha512")); } else { return null; }