aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcomex <comexk@gmail.com>2009-02-21 19:35:27 -0500
committercomex <comexk@gmail.com>2009-02-21 19:35:27 -0500
commitbd4663cc078961794325774fce7b2683225dbfe1 (patch)
treeab12d9962f76e327fef6f4fa00de83caa6ba3047
parent598404cf27a969e875605ea08edbe5d8b2213642 (diff)
Better fix
Diffstat (limited to '')
-rw-r--r--write-brlyt.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/write-brlyt.py b/write-brlyt.py
index 13b3d32..4eccf22 100644
--- a/write-brlyt.py
+++ b/write-brlyt.py
@@ -52,8 +52,6 @@ for c in chunks:
name = thing['name'] + '\x00'
offss.append(len(strings))
strings += name
- while len(strings) % 4 != 0: # todo: replace with something better
- strings += '\0'
for n, thing in enumerate(ls):
chunk += struct.pack('>II', offss[n] + 8 * len(ls), thing['unk'])
chunk += strings
@@ -127,6 +125,8 @@ for c in chunks:
failz
else:
raise Exception('Unhandled type %s' % typ)
+ while len(chunk) % 4 != 0:
+ chunk += '\0'
rlyt += typ + struct.pack('>I', len(chunk) + 8) + chunk