Skip to content

Commit 2eba403

Browse files
committed
1.6.1.2 BundleFile ArchiveBlocksInfoAtTheEnd fix
1 parent f682b8a commit 2eba403

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎UnityPy/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "1.6.1.1"
1+
__version__ = "1.6.1.2"
22

33
from .environment import Environment
44

‎UnityPy/files/BundleFile.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,15 @@ def read_fs(self, reader: EndianBinaryReader):
8484
uncompressedSize = reader.read_u_int()
8585
flags = reader.read_u_int()
8686

87+
if self.version >= 7:
88+
reader.align_stream(16)
89+
8790
_position = reader.Position
8891
if flags & 0x80 != 0: # kArchiveBlocksInfoAtTheEnd
8992
reader.Position = reader.Length - compressedSize
9093
blocksInfoBytes = reader.read_bytes(compressedSize)
9194
reader.Position = _position
9295
else: # 0x40 kArchiveBlocksAndDirectoryInfoCombined
93-
if self.version >= 7:
94-
reader.allign_stream(16)
9596
blocksInfoBytes = reader.read_bytes(compressedSize)
9697

9798
switch = flags & 0x3F

0 commit comments

Comments
 (0)