Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Perfare committed Apr 10, 2020
1 parent 76d17ba commit da98a0c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions AssetStudio/BundleFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,19 @@ private void ReadHeaderAndBlocksInfo(EndianBinaryReader reader)
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)
{
Expand Down

0 comments on commit da98a0c

Please sign in to comment.