diff --git a/defextract.py b/defextract.py index 60e7621..fb6f9c6 100644 --- a/defextract.py +++ b/defextract.py @@ -93,10 +93,13 @@ def extract_def(infile,outdir,shred=True): pixeldata += length*chr(code) totalrowlength+=length elif fmt == 2: - coff, = struct.unpack(" ushrtmax: - print "exceeding max ushort value: %d"%offs - return False - outf.write(struct.pack(" ushrtmax: + print "exceeding max ushort value: %d"%offs + return False + lineoffs.append(offs) + acc += len(d) + outf.write(struct.pack("<%dH"%h, *lineoffs)) + outf.write(struct.pack("