diff options
-rw-r--r-- | cmd/bootmenu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c index 979ac4a638..7f88c1ed63 100644 --- a/cmd/bootmenu.c +++ b/cmd/bootmenu.c @@ -351,6 +351,12 @@ static struct bootmenu_data *bootmenu_create(int delay) } menu->count = i; + + if ((menu->active >= menu->count)||(menu->active < 0)) { //ensure active menuitem is inside menu + printf("active menuitem (%d) is outside menu (0..%d)\n",menu->active,menu->count-1); + menu->active=0; + } + return menu; cleanup: |