1
0
Fork 0
mirror of https://github.com/CTCaer/hekate.git synced 2024-11-22 18:06:40 +00:00

nyx: Fix validation check for emuMMC restore

When checking a partition for enough size for emuMMC restore, always check against the extra 16MB.
This commit is contained in:
CTCaer 2020-06-18 01:23:06 +03:00
parent 3b0925b912
commit 3214fc2f93

View file

@ -61,7 +61,8 @@ static void _get_valid_partition(u32 *sector_start, u32 *sector_size, u32 *part_
curr_part_size = mbr->partitions[i].size_sct;
*sector_start = mbr->partitions[i].start_sct;
u8 type = mbr->partitions[i].type;
if ((curr_part_size >= *sector_size) && *sector_start && type != 0x83 && (!backup || type == 0xE0))
u32 sector_size_safe = !backup ? (*sector_size) + 0x8000 : (*sector_size);
if ((curr_part_size >= sector_size_safe) && *sector_start && type != 0x83 && (!backup || type == 0xE0))
{
if (backup)
{