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 56c01ac commit 061c110
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions py/nstools/Fs/Pfs0.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,13 @@ def __init__(self, buffer, path = None, mode = None, cryptoType = -1, cryptoKey
#self.offset += sectionStart
#self.size -= sectionStart

#0xff => 0x1, 0x100 => 0x20, 0x1ff => 0x1, 0x120 => 0x20
def allign0x20(self, n):
return 0x20-n%0x20

def getPaddedHeaderSize(self):
return self._headerSize + self.allign0x20(self._headerSize);

def getHeaderSize(self):
return self._headerSize;

Expand Down

0 comments on commit 061c110

Please sign in to comment.