Index: apps/tagtree.c =================================================================== --- apps/tagtree.c (revision 14892) +++ apps/tagtree.c (working copy) @@ -504,14 +504,6 @@ return 1; } -/* example search: - * "Best" artist ? year >= "2000" & title !^ "crap" & genre = "good genre" \ - * : album ? year >= "2000" : songs - * ^ begins with - * * contains - * $ ends with - */ - static bool parse_search(struct menu_entry *entry, const char *str) { int ret; @@ -772,6 +764,10 @@ { logf("Load menu fail: %s", data); } + + /*Root menu is found. Stop parsing*/ + if (root_menu >= 0) + return -1; break; case var_menu_start: @@ -815,9 +811,6 @@ break; case var_rootmenu: - /* Only set root menu once. */ - if (root_menu >= 0) - break; if (get_token_str(data, sizeof(data)) < 0) { @@ -830,6 +823,7 @@ if (!strcasecmp(menus[i]->id, data)) { root_menu = i; + return -1; /*Root menu is found. Stop parsing*/ } } break;