FS#7002 - Fix bug in parser of tagnavi.config

Attached to Project: Rockbox
Opened by Mark Reiche (Porphyr) - Monday, 09 April 2007, 18:20 GMT
Task Type Patches
Category Music playback
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


This fixes a small but very nasty bug: If you only specify one menu in your tagnavi_custom.config file and you want to set this as a root_menu, your choice will be overwritten by the root_menu in the default tagnavi.config file. The reason for this is the double meaning of root_menu == 0 - it means both "not yet set" and also "first menu is root_menu".

I fixed this bug by first initialising root_menu with -1 (allowing overwriting of root_menu while parsing only if it is still == -1); after parsing is done, root_menu will be set to zero if it is still -1 (this keeps the old behaviour: if you don't specify root_menu, take the first menu)
This task depends upon

Closed by  Miika Pekkarinen (miipekk)
Thursday, 12 April 2007, 18:34 GMT
Reason for closing:  Accepted
Comment by Miika Pekkarinen (miipekk) - Thursday, 12 April 2007, 18:33 GMT
Thanks again, committed :)