diff --git a/py/nstools/Fs/Pfs0.py b/py/nstools/Fs/Pfs0.py index 5ca027d..9f5e421 100644 --- a/py/nstools/Fs/Pfs0.py +++ b/py/nstools/Fs/Pfs0.py @@ -183,15 +183,14 @@ def updateHashHeader(self): h += b'\x00\x00\x00\x00' stringOffset += len(f['name']) + 1 - stringTable += '\x00' * 12 + if len(self.files) > 0: + if self.files[0]['offset'] - headerSize > 0: + stringTable += '\x00' * (self.files[0]['offset'] - headerSize - 1) + print(self.files[0]['offset'] - headerSize) h += stringTable.encode() headerHex = h.hex() - #print(headerHex) - #print(len(h), self.files[0]['offset']-headerSize) self.binhash.update(h) - #print(self.binhash.hexdigest()) - #exit()