From bd4663cc078961794325774fce7b2683225dbfe1 Mon Sep 17 00:00:00 2001 From: comex Date: Sat, 21 Feb 2009 19:35:27 -0500 Subject: Better fix --- write-brlyt.py | 4 ++-- 1 file 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 -- cgit v1.3.1