From bec27ba16389decade88b411bf297ed3d9748101 Mon Sep 17 00:00:00 2001 From: Simon Hancock Date: Fri, 19 Jan 2024 09:47:03 +0000 Subject: [PATCH] DFReader_text: some arrays indexed by bytes instead of str --- DFReader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DFReader.py b/DFReader.py index 3e20ae367..932c3e2a1 100644 --- a/DFReader.py +++ b/DFReader.py @@ -1147,8 +1147,8 @@ def init_arrays(self, progress_callback=None): while ofs+16 < self.data_len: mtype = self.data_map[ofs:ofs+4] - if mtype[3] == b',': - mtype = mtype[0:3] + # convert to string and cut if there is a ',' + mtype = mtype.decode().split(',')[0] if not mtype in self.offsets: self.counts[mtype] = 0 self.offsets[mtype] = []