BundleFile fix

This commit is contained in:
Perfare 2022-05-21 17:24:54 +08:00 committed by VaDiM
parent 06b4ae9ffe
commit a324366be9

View File

@ -208,6 +208,7 @@ namespace AssetStudio
{
reader.AlignStream(16);
}
var start = reader.Position;
if ((m_Header.flags & 0x80) != 0) //kArchiveBlocksInfoAtTheEnd
{
var position = reader.Position;
@ -279,6 +280,10 @@ namespace AssetStudio
};
}
}
//https://issuetracker.unity3d.com/issues/files-within-assetbundles-do-not-start-on-aligned-boundaries-breaking-patching-on-nintendo-switch
var blockSize = m_BlocksInfo.Sum(x => x.compressedSize);
var padding = reader.BaseStream.Length - start - m_Header.compressedBlocksInfoSize - blockSize;
reader.Position += padding;
}
private void ReadBlocks(EndianBinaryReader reader, Stream blocksStream)