mirror of
https://vps.suchmeme.nl/git/mudkip/Lockpick_RCM.git
synced 2024-11-22 08:29:21 +01:00
Validate pkg1_identify result for main menu
This commit is contained in:
parent
b3f6e055b2
commit
20c0df3715
@ -303,13 +303,15 @@ void _get_key_generations(char *sysnand_label, char *emunand_label)
|
|||||||
sdmmc_storage_end(&storage);
|
sdmmc_storage_end(&storage);
|
||||||
|
|
||||||
u32 pk1_offset = h_cfg.t210b01 ? sizeof(bl_hdr_t210b01_t) : 0; // Skip T210B01 OEM header.
|
u32 pk1_offset = h_cfg.t210b01 ? sizeof(bl_hdr_t210b01_t) : 0; // Skip T210B01 OEM header.
|
||||||
const pkg1_id_t *pkg1_id = pkg1_identify(pkg1 + pk1_offset);
|
const pkg1_id_t *pkg1_id = pkg1_identify(pkg1 + pk1_offset);
|
||||||
sprintf(sysnand_label + 36, "% 3d", pkg1_id->kb);
|
if (pkg1_id) {
|
||||||
ment_top[0].caption = sysnand_label;
|
sprintf(sysnand_label + 36, "% 3d", pkg1_id->kb);
|
||||||
if (h_cfg.emummc_force_disable)
|
ment_top[0].caption = sysnand_label;
|
||||||
{
|
if (h_cfg.emummc_force_disable)
|
||||||
free(pkg1);
|
{
|
||||||
return;
|
free(pkg1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
emummc_storage_init_mmc(&storage, &sdmmc);
|
emummc_storage_init_mmc(&storage, &sdmmc);
|
||||||
@ -319,9 +321,11 @@ void _get_key_generations(char *sysnand_label, char *emunand_label)
|
|||||||
emummc_storage_end(&storage);
|
emummc_storage_end(&storage);
|
||||||
|
|
||||||
pkg1_id = pkg1_identify(pkg1 + pk1_offset);
|
pkg1_id = pkg1_identify(pkg1 + pk1_offset);
|
||||||
sprintf(emunand_label + 36, "% 3d", pkg1_id->kb);
|
if (pkg1_id) {
|
||||||
free(pkg1);
|
sprintf(emunand_label + 36, "% 3d", pkg1_id->kb);
|
||||||
ment_top[1].caption = emunand_label;
|
free(pkg1);
|
||||||
|
ment_top[1].caption = emunand_label;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void pivot_stack(u32 stack_top);
|
extern void pivot_stack(u32 stack_top);
|
||||||
|
Loading…
Reference in New Issue
Block a user