root menu setting: make the setting handles whitespace

Change-Id: Id981bb518017e272dd7a230ae7d799ef0f55847c
This commit is contained in:
Jonathan Gordon 2012-12-16 14:26:03 +11:00
parent 6f47b29915
commit 3ac7af95a9

View file

@ -513,7 +513,7 @@ static struct menu_item_ex *root_menu__[MAX_MENU_ITEMS];
void root_menu_load_from_cfg(void* setting, char *value)
{
char *next = value, *start;
char *next = value, *start, *end;
unsigned int menu_item_count = 0, i;
bool main_menu_added = false;
@ -535,6 +535,9 @@ void root_menu_load_from_cfg(void* setting, char *value)
*next = '\0';
next++;
}
start = skip_whitespace(start);
if ((end = strchr(start, ' ')))
*end = '\0';
for (i=0; i<MAX_MENU_ITEMS; i++)
{
if (*start && !strcmp(start, menu_table[i].string))