Skip to content

Commit e60578a

Browse files
committed
fix(BundleFile CN): don't decrypt uncompressed data
fixes #345
1 parent bef9cc9 commit e60578a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

UnityPy/files/BundleFile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ def decompress_data(
502502
The decompressed data."""
503503
comp_flag = CompressionFlags(flags & ArchiveFlags.CompressionTypeMask)
504504

505-
if self.decryptor is not None and flags & 0x100:
505+
if self.decryptor is not None and flags & 0x100 and comp_flag != CompressionFlags.NONE:
506506
compressed_data = self.decryptor.decrypt_block(compressed_data, index)
507507

508508
if comp_flag in CompressionHelper.DECOMPRESSION_MAP:

0 commit comments

Comments
 (0)