From da98a0c5b82d289f1435379565d2e91f26d69b3a Mon Sep 17 00:00:00 2001 From: Perfare Date: Fri, 10 Apr 2020 18:20:45 +0800 Subject: [PATCH] fixed bug --- AssetStudio/BundleFile.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/AssetStudio/BundleFile.cs b/AssetStudio/BundleFile.cs index ee540d5..18e41a9 100644 --- a/AssetStudio/BundleFile.cs +++ b/AssetStudio/BundleFile.cs @@ -85,15 +85,19 @@ namespace AssetStudio var headerSize = reader.ReadUInt32(); var numberOfLevelsToDownloadBeforeStreaming = reader.ReadUInt32(); var levelCount = reader.ReadInt32(); - m_BlocksInfo = new StorageBlock[levelCount]; + m_BlocksInfo = new StorageBlock[1]; for (int i = 0; i < levelCount; i++) { - m_BlocksInfo[i] = new StorageBlock() + var storageBlock = new StorageBlock() { compressedSize = reader.ReadUInt32(), uncompressedSize = reader.ReadUInt32(), flags = (ushort)(isCompressed ? 1 : 0) }; + if (i == levelCount - 1) + { + m_BlocksInfo[0] = storageBlock; + } } if (m_Header.version >= 2) {