From: jchen20 Date: Wed, 26 Aug 2009 02:21:45 +0000 (+0000) Subject: Fixed a bug on the menu display: Following steps to reproduce it: X-Git-Tag: edk2-stable201903~17122 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=747b19eadc2541cce846f10203761115b04c2410;p=mirror_edk2.git Fixed a bug on the menu display: Following steps to reproduce it: 1. Boot to shell 2. go to boot maint manager 3. Boot options 4. Add boot option 5. Add 15 or so unique boot options (just so the list scrolls) 6. go the boot maint manager 7. go to Boot options 8. go to Change boot order 9. the list is long enough that it scrolls when you push down once (to get to the commit option) 10. push down once and then up once (repeat) (from list selected to "commit" selected) 11. you will notice the list and text is getting corrupt 12. do it until all items in list are gone (system will assert) git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9197 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c index 8b7344f42a..d744c90f19 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c @@ -2696,19 +2696,19 @@ UiDisplayMenu ( TopOfScreen = NewPos; } - Difference = MoveToNextStatement (TRUE, &NewPos); + Difference = MoveToNextStatement (TRUE, &NewPos); PreviousMenuOption = MENU_OPTION_FROM_LINK (NewPos); DistanceValue += PreviousMenuOption->Skip; - if ((INTN) MenuOption->Row - (INTN) DistanceValue < (INTN) TopRow) { + if ((INTN) MenuOption->Row - (INTN) DistanceValue < (INTN) TopRow) { if (Difference > 0) { // // Previous focus MenuOption is above the TopOfScreen, so we need to scroll // TopOfScreen = NewPos; Repaint = TRUE; - SkipValue = 0; - OldSkipValue = 0; + SkipValue = 0; + OldSkipValue = 0; } } if (Difference < 0) {