From 6cc07113824f143d73075e5bd734062419533b97 Mon Sep 17 00:00:00 2001 From: CTCaer Date: Wed, 28 Aug 2019 01:12:34 +0300 Subject: [PATCH] autoboot: Fix force boot from ID --- bootloader/main.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bootloader/main.c b/bootloader/main.c index d4b6530..12566ce 100644 --- a/bootloader/main.c +++ b/bootloader/main.c @@ -733,8 +733,12 @@ static ini_sec_t *get_ini_sec_from_id(ini_sec_t *ini_sec, char *bootlogoCustomEn LIST_FOREACH_ENTRY(ini_kv_t, kv, &ini_sec->kvs, link) { if (!strcmp("id", kv->key)) - if (!strcmp(b_cfg.id, kv->val)) + { + if (b_cfg.id[0] && kv->val[0] && !strcmp(b_cfg.id, kv->val)) cfg_sec = ini_sec; + else + break; + } if (!strcmp("logopath", kv->key)) bootlogoCustomEntry = kv->val; if (!strcmp("emummc_force_disable", kv->key)) @@ -879,6 +883,7 @@ void auto_launch_firmware() if (boot_from_id && cfg_sec) goto skip_list; + cfg_sec = NULL; boot_entry_id = 1; bootlogoCustomEntry = NULL; @@ -920,11 +925,8 @@ skip_list: if (!configEntry) create_config_entry(); - if (!h_cfg.autoboot) - goto out; // Auto boot is disabled. - if (!cfg_sec) - goto out; // No configurations. + goto out; // No configurations or auto boot is disabled. } else goto out; // Can't load hekate_ipl.ini.