This silences the warning printed upon prompt redefinition for the rootmenu. We will encounter this redefinition when a "mainmenu" statement is specified and override the default prompt.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -139,7 +139,7 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e · 138 unmodified lines | ||
| 139 | 139 | while (isspace(*prompt)) |
| 140 | 140 | prompt++; |
| 141 | 141 | } |
| 142 | − if (current_entry->prompt) | |
| 142 | + if (current_entry->prompt && current_entry != &rootmenu) | |
| 143 | 143 | prop_warn(prop, "prompt redefined"); |
| 144 | 144 | current_entry->prompt = prop; |
| 145 | 145 | } |