NCCH: Fix saveDataSize (Oops)
This commit is contained in:
@@ -50,6 +50,7 @@ struct NCCH {
|
|||||||
|
|
||||||
static constexpr u64 mediaUnit = 0x200;
|
static constexpr u64 mediaUnit = 0x200;
|
||||||
u64 size = 0; // Size of NCCH converted to bytes
|
u64 size = 0; // Size of NCCH converted to bytes
|
||||||
|
u64 saveDataSize = 0;
|
||||||
u32 stackSize = 0;
|
u32 stackSize = 0;
|
||||||
u32 bssSize = 0;
|
u32 bssSize = 0;
|
||||||
u32 exheaderSize = 0;
|
u32 exheaderSize = 0;
|
||||||
@@ -76,7 +77,7 @@ struct NCCH {
|
|||||||
bool hasExeFS() { return exeFS.size != 0; }
|
bool hasExeFS() { return exeFS.size != 0; }
|
||||||
bool hasRomFS() { return romFS.size != 0; }
|
bool hasRomFS() { return romFS.size != 0; }
|
||||||
bool hasCode() { return codeFile.size() != 0; }
|
bool hasCode() { return codeFile.size() != 0; }
|
||||||
bool hasSaveData() { return saveData.size() != 0; }
|
bool hasSaveData() { return saveDataSize != 0; }
|
||||||
|
|
||||||
// Parse SMDH for region info and such. Returns false on failure, true on success
|
// Parse SMDH for region info and such. Returns false on failure, true on success
|
||||||
bool parseSMDH(const std::vector<u8> &smdh);
|
bool parseSMDH(const std::vector<u8> &smdh);
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ bool NCCH::loadFromHeader(Crypto::AESEngine &aesEngine, IOFile& file, const FSIn
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[[maybe_unused]] const u64 saveDataSize = *(u64*)&exheader[0x1C0 + 0x0]; // Size of save data in bytes
|
saveDataSize = *(u64*)&exheader[0x1C0 + 0x0]; // Size of save data in bytes
|
||||||
|
|
||||||
compressCode = (exheader[0xD] & 1) != 0;
|
compressCode = (exheader[0xD] & 1) != 0;
|
||||||
stackSize = *(u32*)&exheader[0x1C];
|
stackSize = *(u32*)&exheader[0x1C];
|
||||||
|
|||||||
Reference in New Issue
Block a user