summaryrefslogtreecommitdiff
path: root/apps/tagtree.c
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2007-04-12 18:33:40 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2007-04-12 18:33:40 +0000
commite6de6e5f8ae96649d0bdf1a26fc135e755c6f183 (patch)
tree04e167f2b3874ba44e76c3b04e92b7019bed3f29 /apps/tagtree.c
parent0569fae8ec2b7138d512aac01f2bfd09c89fdde8 (diff)
downloadrockbox-e6de6e5f8ae96649d0bdf1a26fc135e755c6f183.tar.gz
rockbox-e6de6e5f8ae96649d0bdf1a26fc135e755c6f183.zip
FS#7002 - Fix a bug in parser of tagnavi.config preventing to set first menu as the root menu.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13130 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tagtree.c')
-rw-r--r--apps/tagtree.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/tagtree.c b/apps/tagtree.c
index 040aea35d1..e9370fa443 100644
--- a/apps/tagtree.c
+++ b/apps/tagtree.c
@@ -793,7 +793,7 @@ static int parse_line(int n, const char *buf, void *parameters)
793 793
794 case var_rootmenu: 794 case var_rootmenu:
795 /* Only set root menu once. */ 795 /* Only set root menu once. */
796 if (root_menu) 796 if (root_menu >= 0)
797 break; 797 break;
798 798
799 if (get_token_str(data, sizeof(data)) < 0) 799 if (get_token_str(data, sizeof(data)) < 0)
@@ -868,9 +868,14 @@ void tagtree_init(void)
868 format_count = 0; 868 format_count = 0;
869 menu_count = 0; 869 menu_count = 0;
870 menu = NULL; 870 menu = NULL;
871 root_menu = 0; 871 root_menu = -1;
872 parse_menu(FILE_SEARCH_INSTRUCTIONS); 872 parse_menu(FILE_SEARCH_INSTRUCTIONS);
873 873
874 /* If no root menu is set, assume it's the first single menu
875 * we have. That shouldn't normally happen. */
876 if (root_menu < 0)
877 root_menu = 0;
878
874 uniqbuf = buffer_alloc(UNIQBUF_SIZE); 879 uniqbuf = buffer_alloc(UNIQBUF_SIZE);
875 audio_set_track_buffer_event(tagtree_buffer_event); 880 audio_set_track_buffer_event(tagtree_buffer_event);
876 audio_set_track_unbuffer_event(tagtree_unbuffer_event); 881 audio_set_track_unbuffer_event(tagtree_unbuffer_event);