:: commit e52cba9a9eadf1f78d2249ee789d18ab334a9179

mintsuki <mintsuki@protonmail.com> — 2024-06-07 22:48

parents: 60e3b09f7d

lib/panic: Use ternary in 'return to' message

diff --git a/common/lib/panic.s2.c b/common/lib/panic.s2.c
index fab4e896..52c66d71 100644
--- a/common/lib/panic.s2.c
+++ b/common/lib/panic.s2.c
@@ -50,12 +50,7 @@ noreturn void panic(bool allow_menu, const char *fmt, ...) {
       stage3_loaded == true &&
 #endif
       allow_menu == true) {
-        if (booting_from_editor == true) {
-            print("Press a key to return to editor.");
-        }
-        else {
-            print("Press a key to return to menu.");
-        }
+        print("Press a key to return to %s.", booting_from_editor ? "editor" : "menu");
 
         getchar();
 
tab: 248 wrap: offon