[game-data-packager] 03/16: umod: filename lengths are a compact index
Simon McVittie
smcv at debian.org
Fri Jan 8 09:14:02 UTC 2016
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch master
in repository game-data-packager.
commit 5f6df49973cb03850f949e350aa86013e7e68cb7
Author: Simon McVittie <smcv at debian.org>
Date: Thu Jan 7 09:45:10 2016 +0000
umod: filename lengths are a compact index
UTbasePatch436nodelta.exe contains a long filename, which means we can
distinguish.
---
game_data_packager/unpack/umod.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/game_data_packager/unpack/umod.py b/game_data_packager/unpack/umod.py
index 086765f..a060eb2 100644
--- a/game_data_packager/unpack/umod.py
+++ b/game_data_packager/unpack/umod.py
@@ -306,10 +306,7 @@ class Umod(StreamUnpackable):
n_entries = self.__read_compact_index()
for i in range(n_entries):
- # FIXME: is this a compact index, or just a 1-byte value?
- # We'll never know unless a filename needs more than 6 bits
- # (64 bytes including \0). For now we assume a 1-byte value.
- strlen = self.reader.read(1)[0]
+ strlen = self.__read_compact_index()
name = self.reader.read(strlen).decode('windows-1252')
assert name[-1] == '\0'
name = name[:-1]
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git
More information about the Pkg-games-commits
mailing list