1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-26 22:02:15 +00:00

loader: fix support for 7.0.0+ games with NPDM flag bit 4 set.

This commit is contained in:
Michael Scire 2019-04-11 16:39:59 -07:00
parent 1e5fcff242
commit 67891954ec

View file

@ -117,9 +117,16 @@ Result NpdmUtils::LoadNpdmInternal(FILE *f_npdm, NpdmUtils::NpdmCache *cache) {
return rc; return rc;
} }
/* 7.0.0 added 0x10 as a valid bit to NPDM flags. */
if (GetRuntimeFirmwareVersion() >= FirmwareVersion_700) {
if (info->header->mmu_flags > 0x1F) {
return rc;
}
} else {
if (info->header->mmu_flags > 0xF) { if (info->header->mmu_flags > 0xF) {
return rc; return rc;
} }
}
if (info->header->aci0_offset < sizeof(NpdmUtils::NpdmHeader) || info->header->aci0_size < sizeof(NpdmUtils::NpdmAci0) || info->header->aci0_offset + info->header->aci0_size > npdm_size) { if (info->header->aci0_offset < sizeof(NpdmUtils::NpdmHeader) || info->header->aci0_size < sizeof(NpdmUtils::NpdmAci0) || info->header->aci0_offset + info->header->aci0_size > npdm_size) {
return rc; return rc;