:: commit 4f701f919471ec3d6607ed3bf8d41ee32c16e20e

Mintsuki <mintsuki@protonmail.com> — 2026-04-12 13:28

parents: bb59e40e10

menu: Fix bug where `, Secure Boot)` would be appended even for custom brandings

Fixes #550.
diff --git a/common/menu.c b/common/menu.c
index 87f88b9e..14e9fdbe 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -1114,12 +1114,14 @@ noreturn void _menu(bool first_run) {
         interface_help_colour_bright[3] = interface_help_colour_str[0];
     }
 
+    bool custom_branding = false;
     {
         char *tmp = config_get_value(NULL, 0, "INTERFACE_BRANDING");
         if (tmp != NULL) {
             size_t len = strlen(tmp) + 1;
             menu_branding = ext_mem_alloc(len);
             memcpy(menu_branding, tmp, len);
+            custom_branding = true;
         }
     }
     if (menu_branding == NULL) {
@@ -1158,7 +1160,7 @@ noreturn void _menu(bool first_run) {
 #endif
     }
 
-    if (secure_boot_active) {
+    if (secure_boot_active && !custom_branding) {
         const char *suffix = ", Secure Boot)";
         size_t suffix_len = strlen(suffix) + 1;
         size_t old_len = strlen(menu_branding);
tab: 248 wrap: offon