diff --git a/src/msglc/reader.py b/src/msglc/reader.py index 23c2717..1bbcd69 100644 --- a/src/msglc/reader.py +++ b/src/msglc/reader.py @@ -125,9 +125,7 @@ def _child(self, toc: dict | int): # {"p": [start_pos, end_pos]} # this is used in small objects if 2 == len(child_pos := toc["p"]) and all(isinstance(x, int) for x in child_pos): - if isinstance(data := self._read(*child_pos), bytes) and data.startswith( - b"\x80\x02cnumpy.core.multiarray" - ): + if isinstance(data := self._read(*child_pos), bytes) and b"numpy.core.multiarray" in data[:40]: return pickle.loads(data) return data