#include <common.h>
#include <command.h>
#include <ansi.h>
+#include <env.h>
#include <menu.h>
#include <watchdog.h>
#include <malloc.h>
}
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:
puts(ANSI_CLEAR_LINE);
}
-#ifdef CONFIG_MENU_SHOW
+#ifdef CONFIG_AUTOBOOT_MENU_SHOW
int menu_show(int bootdelay)
{
bootmenu_show(bootdelay);