diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-02-19 18:40:37 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-02-19 18:40:37 -0800 |
commit | f96bf79f8ee04fe19b68cb026b235ca3baa8421a (patch) | |
tree | 8d6be8863ebc27656b9ced3b1e37cb7671a26257 | |
parent | c7d9ee8f4552a62962dae614d5dcb3ef7dd9ce0e (diff) | |
download | syslinux-f96bf79f8ee04fe19b68cb026b235ca3baa8421a.tar.gz |
Fix MENU TITLE -> MENU LABEL inheritancesyslinux-3.62-pre12
Correctly make it so MENU TITLE can be inherited upward as MENU TITLE
unless one is provided.
-rw-r--r-- | com32/menu/readconfig.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/com32/menu/readconfig.c b/com32/menu/readconfig.c index 7efee912..a17beb2f 100644 --- a/com32/menu/readconfig.c +++ b/com32/menu/readconfig.c @@ -119,7 +119,7 @@ static struct menu * new_menu(struct menu *parent, struct menu *m = calloc(1, sizeof(struct menu)); int i; - m->label = refstrdup(label); + m->label = label; m->title = refstr_get(empty_string); if (parent) { @@ -347,7 +347,7 @@ static struct menu *begin_submenu(const char *tag) me = new_entry(current_menu); me->displayname = refstrdup(tag); - return new_menu(current_menu, me, tag); + return new_menu(current_menu, me, refstr_get(me->displayname)); } static struct menu *end_submenu(void) @@ -583,7 +583,7 @@ static void parse_config_file(FILE *f) m->title = refstrdup(skipspace(p+5)); if (m->parent_entry) { /* MENU TITLE -> MENU LABEL on submenu */ - if (m->parent_entry->displayname == m->parent_entry->label) { + if (m->parent_entry->displayname == m->label) { refstr_put(m->parent_entry->displayname); m->parent_entry->displayname = refstr_get(m->title); } @@ -905,8 +905,8 @@ void parse_configs(char **argv) empty_string = refstrdup(""); /* Initialize defaults for the root and hidden menus */ - hide_menu = new_menu(NULL, NULL, ".hidden"); - root_menu = new_menu(NULL, NULL, ".top"); + hide_menu = new_menu(NULL, NULL, refstrdup(".hidden")); + root_menu = new_menu(NULL, NULL, refstrdup(".top")); start_menu = root_menu; /* Other initialization */ |