Shouldn't the error message use b"".join first? As is, the value is a bunch of single-byte strings.
Possible correction:
def read_cstring(self) -> bytes:
retlst = []
c = self.read(1)
while c and c != b"\0":
retlst.append(c)
c = self.read(1)
ret = "".join(retlst)
if not c:
raise ValueError("Unterminated string: %r" % (ret))
return ret
https://github.com/HearthSim/UnityPack/blob/e0e53d280537f495ef744657005a06dea3cd0694/unitypack/utils.py#L83
Shouldn't the error message use
b"".join
first? As is, the value is a bunch of single-byte strings.Possible correction: