When returning selectable menu, should return the menu in current form,
the codes miss to do the check. Now returning the selectable menu behind
the codes "if ((UINTN) Distance + NextMenuOption->Skip > GapToTop)".
Then can cover the check, can return the menu correctly.
https://bugzilla.tianocore.org/show_bug.cgi?id=232
Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
UpdateOptionSkipLines (NextMenuOption);\r
}\r
\r
- if (IsSelectable (NextMenuOption)) {\r
- break;\r
- }\r
-\r
//\r
- // In this case, still can't find the selectable menu,\r
+ // Check whether the menu is beyond current showing form,\r
// return the first one beyond the showing form.\r
//\r
if ((UINTN) Distance + NextMenuOption->Skip > GapToTop) {\r
break;\r
}\r
\r
+ //\r
+ // return the selectable menu in the showing form.\r
+ //\r
+ if (IsSelectable (NextMenuOption)) {\r
+ break;\r
+ }\r
+\r
Distance += NextMenuOption->Skip;\r
\r
//\r