From: H. Peter Anvin Date: Wed, 20 Feb 2008 02:27:35 +0000 (-0800) Subject: simple menu: fix the handling of '+' and '-' given disabled entries X-Git-Tag: syslinux-3.62-pre12~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=905ba26066f92b6ad64941dbfbb0463112b35275;p=platform%2Fupstream%2Fsyslinux.git simple menu: fix the handling of '+' and '-' given disabled entries When encountering disabled entries, we want to keep going. Given that these particular keys have nonstandard scrolling, but the handling there. --- diff --git a/com32/menu/menumain.c b/com32/menu/menumain.c index 2bbbc4f..7304986 100644 --- a/com32/menu/menumain.c +++ b/com32/menu/menumain.c @@ -914,13 +914,17 @@ run_menu(void) break; case '-': - entry--; - top--; + do { + entry--; + top--; + } while (entry > 0 && is_disabled(cm->menu_entries[entry])); break; case '+': - entry++; - top++; + do { + entry++; + top++; + } while (entry < cm->nentries-1 && is_disabled(cm->menu_entries[entry])); break; case KEY_CTRL('A'):