Fix a bug in the bundle block reader. Close #119

This commit is contained in:
VaDiM
2026-01-27 00:04:49 +03:00
parent 4abdb30fc9
commit 6fcbf4ca2e
+2 -1
View File
@@ -432,7 +432,8 @@ namespace AssetStudio
byte[] sharedUncompressedBuff = null; byte[] sharedUncompressedBuff = null;
if (blocksCompression > CompressionType.Lzma && blocksCompression != CompressionType.Lzham) if (blocksCompression > CompressionType.Lzma && blocksCompression != CompressionType.Lzham)
{ {
sharedCompressedBuff = BigArrayPool<byte>.Shared.Rent(blockSize); var maxCompressedSize = (int)m_BlocksInfo.Max(x => x.compressedSize);
sharedCompressedBuff = BigArrayPool<byte>.Shared.Rent(maxCompressedSize);
sharedUncompressedBuff = BigArrayPool<byte>.Shared.Rent(blockSize); sharedUncompressedBuff = BigArrayPool<byte>.Shared.Rent(blockSize);
} }