From 88e7e466ba692d63127b127a690fcb7f4c609889 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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/DFReader.py b/DFReader.py index 3e20ae367..931473fb7 100644 --- a/DFReader.py +++ b/DFReader.py @@ -1147,8 +1147,7 @@ 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] + mtype = mtype.decode().rstrip(', ') if not mtype in self.offsets: self.counts[mtype] = 0 self.offsets[mtype] = []