From cddd5e877700fe0662ab6186e0818846141e1395 Mon Sep 17 00:00:00 2001 From: Thanatos Date: Sat, 18 Nov 2023 20:08:04 +0100 Subject: [PATCH] Fix wrong header in pkg --- src/mercury_engine_data_structures/formats/pkg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mercury_engine_data_structures/formats/pkg.py b/src/mercury_engine_data_structures/formats/pkg.py index 2e0e6da9..8fa4982b 100644 --- a/src/mercury_engine_data_structures/formats/pkg.py +++ b/src/mercury_engine_data_structures/formats/pkg.py @@ -96,7 +96,7 @@ def _build(self, obj: construct.Container, stream, context, path): construct.stream_seek(stream, 2 * self.int_size.length, 1, path) # Skip over file headers - construct.stream_seek(stream, len(obj.files) * file_entry_size, 1, path) + construct.stream_seek(stream, self.int_size.length + len(obj.files) * file_entry_size, 1, path) # Align to 128 bytes AlignTo(128)._build(None, stream, context, path)