From db9b670fd2e2a933c12c706e6dd721ec50fb3d77 Mon Sep 17 00:00:00 2001 From: Razmoth <32140579+Razmoth@users.noreply.github.com> Date: Sun, 2 Jul 2023 11:13:06 +0400 Subject: [PATCH] [SR] fix issue with loading some bundles --- AssetStudio/BundleFile.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/AssetStudio/BundleFile.cs b/AssetStudio/BundleFile.cs index fbb1f62..e421af6 100644 --- a/AssetStudio/BundleFile.cs +++ b/AssetStudio/BundleFile.cs @@ -73,6 +73,9 @@ namespace AssetStudio public StreamFile[] fileList; + + private bool HasUncompressedDataHash = true; + public BundleFile(FileReader reader, Game game) { Game = game; @@ -141,6 +144,7 @@ namespace AssetStudio header.version = 6; // is 7 but does not have uncompressedDataHash header.unityVersion = "5.x.x"; header.unityRevision = "2019.4.32f1"; + HasUncompressedDataHash = false; break; default: if (Game.Type.IsNaraka()) @@ -370,7 +374,7 @@ namespace AssetStudio } using (var blocksInfoReader = new EndianBinaryReader(blocksInfoUncompresseddStream)) { - if (m_Header.version >= 7 || !Game.Type.IsSRGroup()) + if (m_Header.version >= 7 || (Game.Type.IsSRGroup() && HasUncompressedDataHash)) { var uncompressedDataHash = blocksInfoReader.ReadBytes(16); }