diff --git a/source/arm11/menu/menu.c b/source/arm11/menu/menu.c index 9e03eeb..294c9c8 100644 --- a/source/arm11/menu/menu.c +++ b/source/arm11/menu/menu.c @@ -59,7 +59,7 @@ } // boot mode description - if ((flags & MENU_FLAG_BOOTMODE) && (index == 3)) + if ((flags & MENU_FLAG_BOOTMODE) && (index == N_BOOTSLOTS)) { if (configDataExist(KBootMode)) { @@ -182,7 +182,7 @@ u32 prevSlot = readStoredBootslot(); consoleSetCursor(desc_con, conw - 16 - 1, curY++); ee_printf(ESC_SCHEME_WEAK "reboot: " ESC_RESET); - if ((prevSlot >= 1) && (prevSlot <= 3)) + if ((prevSlot >= 1) && (prevSlot <= N_BOOTSLOTS)) ee_printf(" slot %lu ", prevSlot); else ee_printf("autoboot"); diff --git a/source/arm9/firm.c b/source/arm9/firm.c index 27bdc0d..86d73b8 100644 --- a/source/arm9/firm.c +++ b/source/arm9/firm.c @@ -79,7 +79,7 @@ } }; -static int firmLaunchArgc = 1; +static int firmLaunchArgc; @@ -289,8 +289,8 @@ } } - ((const char**)(ITCM_KERNEL_MIRROR + 0x7470))[0] = ((const char*)(ITCM_KERNEL_MIRROR + 0x7490)); strncpy_s((void*)(ITCM_KERNEL_MIRROR + 0x7490), path, 256, 256); + ((const char**)(ITCM_KERNEL_MIRROR + 0x7470))[0] = ((const char*)(ITCM_KERNEL_MIRROR + 0x7490)); if(!installMode && firmHdr->reserved2[0] & 1) // Adjust argc/v if screen init flag is set. { @@ -314,11 +314,15 @@ memcpy((void*)(ITCM_KERNEL_MIRROR + 0x7478), &fbs, sizeof(fbs)); ((const char**)(ITCM_KERNEL_MIRROR + 0x7470))[1] = ((const char*)(ITCM_KERNEL_MIRROR + 0x7478)); - firmLaunchArgc++; + firmLaunchArgc = 2; return 1; } - else return 0; + else + { + firmLaunchArgc = 1; + return 0; + } } noreturn void firmLaunch(void)