From 20ca94944d9fac983ec009d9f76d14966e8ac7a8 Mon Sep 17 00:00:00 2001 From: Lume <141330891+Kniffler@users.noreply.github.com> Date: Sun, 14 Jun 2026 14:09:34 +0100 Subject: [PATCH] Me when I forget to add a pretty important if statement: >:( --- Code/pico_multi_booter/sd_boot/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Code/pico_multi_booter/sd_boot/main.c b/Code/pico_multi_booter/sd_boot/main.c index e97175f..b1f73a3 100644 --- a/Code/pico_multi_booter/sd_boot/main.c +++ b/Code/pico_multi_booter/sd_boot/main.c @@ -265,7 +265,11 @@ int load_firmware_by_path(const char *path) // When path is null, we only wish to launch, not load, so we need to check the validity as well. if(path == NULL && has_valid_app) { load_success = true; - }else{ + }else if(path == NULL && !has_valid_app) { + DEBUG_PRINT("err: given path is NULL but existing program is invalid, rebooting\n"); + sleep_ms(2000); + watchdog_reboot(0, 0, 0); + }else{ // Independent of validity, a path indicates that we wish to load it. load_success = load_program(path); has_valid_app = is_valid_application(app_location); }