]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/UefiHiiLib/HiiString.c
MdeModulePkg/DxeHttpLib: Check the input parameters for some APIs.
[mirror_edk2.git] / MdeModulePkg / Library / UefiHiiLib / HiiString.c
index 70e0f4d648165330e1f035f3c68c59c7005fa434..c6a241e6577b55139d08d199432f03ee50de481a 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   HII Library implementation that uses DXE protocols and services.\r
 \r
-  Copyright (c) 2006 - 2010, Intel Corporation<BR>\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2006 - 2015, 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
   http://opensource.org/licenses/bsd-license.php\r
@@ -100,12 +100,19 @@ HiiSetString (
     Language = Supported;\r
 \r
     //\r
-    // Search for the next language seperator and replace it with a Null-terminator\r
+    // Search for the next language separator and replace it with a Null-terminator\r
     //\r
     for (; *Supported != 0 && *Supported != ';'; Supported++);\r
     if (*Supported != 0) {\r
       *(Supported++) = '\0';\r
     }\r
+    \r
+    if ((SupportedLanguages == NULL) && AsciiStrnCmp (Language, UEFI_CONFIG_LANG, AsciiStrLen (UEFI_CONFIG_LANG)) == 0) {\r
+      //\r
+      // Skip string package used for keyword protocol.\r
+      //\r
+      continue;\r
+    }\r
 \r
     //\r
     // If StringId is 0, then call NewString().  Otherwise, call SetString()\r
@@ -250,7 +257,7 @@ HiiGetString (
   //\r
   // Get the current platform language setting\r
   //\r
-  PlatformLanguage = GetEfiGlobalVariable (L"PlatformLang");\r
+  GetEfiGlobalVariable2 (L"PlatformLang", (VOID**)&PlatformLanguage, NULL);\r
 \r
   //\r
   // If Languag is NULL, then set it to an empty string, so it will be \r