diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2004-10-19 09:07:08 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2004-10-19 09:07:08 +0000 |
commit | e88f8b1ffeb65042ee9877e92c30825635a68e84 (patch) | |
tree | de364d668de6fd046dd080eaa247dcbd5cef24f4 /apps | |
parent | ef8d508d5a276c0e738c0e9d6d1b574a6024f0fb (diff) | |
download | rockbox-e88f8b1ffeb65042ee9877e92c30825635a68e84.tar.gz rockbox-e88f8b1ffeb65042ee9877e92c30825635a68e84.zip |
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
Diffstat (limited to 'apps')
-rw-r--r-- | apps/menu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/menu.c b/apps/menu.c index 2837974c9d..bdf255cc39 100644 --- a/apps/menu.c +++ b/apps/menu.c | |||
@@ -434,7 +434,7 @@ void menu_delete(int menu, int position) | |||
434 | menus[menu].itemcount--; | 434 | menus[menu].itemcount--; |
435 | 435 | ||
436 | /* adjust if this was the last menu item and the cursor was on it */ | 436 | /* adjust if this was the last menu item and the cursor was on it */ |
437 | if( menus[menu].itemcount <= menus[menu].cursor) | 437 | if(menus[menu].itemcount && menus[menu].itemcount <= menus[menu].cursor) |
438 | menus[menu].cursor = menus[menu].itemcount - 1; | 438 | menus[menu].cursor = menus[menu].itemcount - 1; |
439 | } | 439 | } |
440 | 440 | ||