1
0
Fork 0
mirror of https://github.com/Scandal-UK/Incognito_RCM.git synced 2024-11-22 03:46:39 +00:00

Fixed a regression bug which involved an overwritten Hekate file

This commit is contained in:
Dan Ware 2020-05-31 22:13:31 +01:00
parent 6bb2687d84
commit 99a2b2be51

View file

@ -149,11 +149,20 @@ bool prodinfo_write(
if(!_emmc_xts(9, 8, 1, tweak, regen_tweak, tweak_exp, prev_cluster, buff, buff, count * 0x200)){
return false;
}
if (nx_emmc_part_write(&storage, prodinfo_part, sector, count, buff))
if (nx_emummc_part_write(&storage, prodinfo_part, sector, count, buff))
{
prev_sector = sector + count - 1;
return true;
}
return false;
}
}
// replacement for nx_emmc_part_write in storage/nx_emmc, which uses sdmmc_storage_write
int nx_emummc_part_write(sdmmc_storage_t *storage, emmc_part_t *part, u32 sector_off, u32 num_sectors, void *buf)
{
// The last LBA is inclusive.
if (part->lba_start + sector_off > part->lba_end)
return 0;
return emummc_storage_write(storage, part->lba_start + sector_off, num_sectors, buf);
}