]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c
MdeModulePkg/UefiPxeBcDxe: Fix the PXE BootMenu selection issue
[mirror_edk2.git] / MdeModulePkg / Universal / Network / UefiPxeBcDxe / PxeBcDhcp.c
index f0720e5a8cf2a89ffb014da5099eb2b96bbf0cb9..c5f343788bf875b7631169906e56125e73f8517b 100644 (file)
@@ -2,7 +2,7 @@
   Support for PxeBc dhcp functions.\r
 \r
 Copyright (c) 2013, Red Hat, Inc.\r
-Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -1845,7 +1845,7 @@ PxeBcSelectBootMenu (
   PXEBC_BOOT_MENU_ENTRY      *MenuArray[PXEBC_MAX_MENU_NUM];\r
 \r
   Finish  = FALSE;\r
-  Select  = 1;\r
+  Select  = 0;\r
   Index   = 0;\r
   *Type   = 0;\r
 \r
@@ -1914,7 +1914,7 @@ PxeBcSelectBootMenu (
       gBS->Stall (10 * TICKS_PER_MS);\r
     }\r
 \r
-    if (InputKey.ScanCode != 0) {\r
+    if (InputKey.ScanCode == 0) {\r
       switch (InputKey.UnicodeChar) {\r
       case CTRL ('c'):\r
         InputKey.ScanCode = SCAN_ESC;\r