Skip to content

Commit

Permalink
PFS0 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
seiya-git committed Jan 1, 2024
1 parent 36a52b5 commit ee87713
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py/nstools/Fs/Pfs0.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def getStringTableSize(self):
self._stringTableSize = stringTableSizePadded
elif len(stringTableNonPadded) > self._stringTableSize:
self._stringTableSize = len(stringTableNonPadded)
return self._stringTableSize-1
return self._stringTableSize

def getHash(self):
hexHash = self.binhash.hexdigest()
Expand Down Expand Up @@ -188,7 +188,7 @@ def updateHashHeader(self):

if len(self.files) > 0:
if self.files[0]['offset'] - headerSize > 0:
stringTable += '\x00' * (self.files[0]['offset'] - headerSize - 1)
stringTable += '\x00' * (self.files[0]['offset'] - headerSize)
h += stringTable.encode()

headerHex = h.hex()
Expand Down

0 comments on commit ee87713

Please sign in to comment.