From 6153bded0c8f6a1e8d8c6c3c2b69a66b47dde585 Mon Sep 17 00:00:00 2001 From: itsme Date: Wed, 7 Jul 2021 11:29:08 +0200 Subject: corrected use of the need_decode flag, added support for -a option with '--nokod' --- crodump.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/crodump.py b/crodump.py index f50f45b..46fd969 100644 --- a/crodump.py +++ b/crodump.py @@ -83,12 +83,12 @@ class Datafile: return kodecode(idx, encdat) - def dump(self, args, nodecode=False): + def dump(self, args): print("tadhdr: %08x %08x" % tuple(self.tadhdr)) ranges = [] # keep track of used bytes in the .dat file. for i, (ofs, ln, chk) in enumerate(self.tadidx): if ln==0xFFFFFFFF: - print("%5d: %08x %08x %08x" % (i, ofs, ln, chk)) + print("%5d: %08x %08x %08x" % (i+1, ofs, ln, chk)) continue flags = ln>>24 @@ -102,7 +102,7 @@ class Datafile: if not dat: # empty record encdat = dat - elif not nodecode and not flags: + elif self.need_decode and not flags: extofs, extlen = struct.unpack("