[syslinux] Final line of menu selectable even if it is disabled
Matt Fleming
matt at console-pimps.org
Tue Oct 9 05:10:31 PDT 2012
On Wed, 2012-09-05 at 10:53 +0100, Matt Sephton wrote:
> I have a menu conf as follows:
>
> LABEL enabled, use as item
> LABEL disabled, use as description
> SEPARATOR
> LABEL enabled, use as item
> LABEL disabled, use as description
>
> In this situation, I expect the cursors to be able to select from only the two enabled lines.
>
> However, the final disabled line is also selectable.
>
> Even if I put a final separator and/or disabled label the final line of the menu is still selectable.
>
> Full conf: http://pastebin.com/U6zQVbt6
>
> So there seems to be an edge case scenario that means the final line of a menu is selectable when it should not be.
>
> Any thoughts?
Matt, it does indeed look like you're hitting an edge case.
Could you apply the following patch on top of 4.06-pre12 and see whether
your issue is resolved?
diff --git a/com32/menu/menumain.c b/com32/menu/menumain.c
index 5b3f6bd..7c58979 100644
--- a/com32/menu/menumain.c
+++ b/com32/menu/menumain.c
@@ -958,8 +958,7 @@ static const char *run_menu(void)
case KEY_DOWN:
case KEY_CTRL('N'):
- while (entry < cm->nentries - 1) {
- entry++;
+ while (++entry < cm->nentries) {
if (entry >= top + MENU_ROWS)
top += MENU_ROWS;
if (!is_disabled(cm->menu_entries[entry]))
--
Matt Fleming, Intel Open Source Technology Center
More information about the Syslinux
mailing list