mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-12 22:52:28 -05:00
Deleting the last menu item no longer gives a negative cursor position
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5307 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ef8d508d5a
commit
e88f8b1ffe
1 changed files with 1 additions and 1 deletions
|
|
@ -434,7 +434,7 @@ void menu_delete(int menu, int position)
|
|||
menus[menu].itemcount--;
|
||||
|
||||
/* adjust if this was the last menu item and the cursor was on it */
|
||||
if( menus[menu].itemcount <= menus[menu].cursor)
|
||||
if(menus[menu].itemcount && menus[menu].itemcount <= menus[menu].cursor)
|
||||
menus[menu].cursor = menus[menu].itemcount - 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue