aboutsummaryrefslogtreecommitdiffstats
path: root/com32/menu/menu.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-02-19 16:16:03 -0800
committerH. Peter Anvin <hpa@zytor.com>2008-02-19 16:51:24 -0800
commite2bfd46bfc6372501d9379f5251bd97cce04ff3c (patch)
treeaa33fcf2f689262b715dbc9dbf08c015cf2fa681 /com32/menu/menu.h
parent87e51b1848c449827e1a5a6438a19d2047021816 (diff)
downloadsyslinux.git-e2bfd46bfc6372501d9379f5251bd97cce04ff3c.tar.gz
syslinux.git-e2bfd46bfc6372501d9379f5251bd97cce04ff3c.tar.xz
syslinux.git-e2bfd46bfc6372501d9379f5251bd97cce04ff3c.zip
simple menu: The use of realloc() requires indirect pointers
Since we store pointers to struct menu_entry, we can't put it in storage that is subject to realloc(). Accordingly, make menu_entries an indirect array instead.
Diffstat (limited to 'com32/menu/menu.h')
-rw-r--r--com32/menu/menu.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/com32/menu/menu.h b/com32/menu/menu.h
index 62b2f46a..99d378e5 100644
--- a/com32/menu/menu.h
+++ b/com32/menu/menu.h
@@ -45,6 +45,7 @@ enum menu_action {
};
struct menu_entry {
+ int entry; /* Entry number inside menu */
const char *displayname;
const char *label;
const char *passwd;
@@ -134,7 +135,7 @@ struct menu {
struct menu *parent;
struct menu_entry *parent_entry; /* Entry for self in parent */
- struct menu_entry *menu_entries;
+ struct menu_entry **menu_entries;
struct menu_entry *menu_hotkeys[256];
const char *messages[MSG_COUNT];