Fix DOL size calculation

This commit is contained in:
Phillip Stephens 2015-07-04 10:56:22 -07:00
parent 306c910710
commit f6105c5c8d
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ void DiscBase::IPartition::extractToDirectory(const SystemString& path, bool for
std::unique_ptr<IFileIO::IWriteStream> ws = NewFileIO(dolPath)->beginWriteStream(); std::unique_ptr<IFileIO::IWriteStream> ws = NewFileIO(dolPath)->beginWriteStream();
ws->write(&hdr, sizeof(DOLHeader)); ws->write(&hdr, sizeof(DOLHeader));
/* Calculate Dol size */ /* Calculate Dol size */
uint32_t dolSize = SBig(hdr.textOff[0]); uint32_t dolSize = SBig(hdr.textOff[0]) - sizeof(DOLHeader);
for (uint32_t i = 0 ; i < 7 ; i++) for (uint32_t i = 0 ; i < 7 ; i++)
dolSize += SBig(hdr.textSizes[i]); dolSize += SBig(hdr.textSizes[i]);
for (uint32_t i = 0 ; i < 11 ; i++) for (uint32_t i = 0 ; i < 11 ; i++)