mirror of
https://github.com/Scandal-UK/Incognito_RCM.git
synced 2024-12-22 10:22:04 +00:00
Fixed a regression bug which involved an overwritten Hekate file
This commit is contained in:
parent
6bb2687d84
commit
99a2b2be51
1 changed files with 11 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue