]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/HiiLib/HiiString.c
Fix a bug in the assert condition.
[mirror_edk2.git] / MdePkg / Library / HiiLib / HiiString.c
index c7d11a5761d6c9868d0441501d3cbbf1c5f37c54..af867e1a1aaf9100db30ac2d68b2897b335ca12b 100644 (file)
@@ -212,8 +212,8 @@ Out:
   This function try to retrieve string from String package of current language.\r
   If fails, it try to retrieve string from String package of first language it support.\r
 \r
-  If String is NULL, then ASSERT.\r
   If StringSize is NULL, then ASSERT.\r
+  If String is NULL and *StringSize is not 0, then ASSERT.\r
   If PackageList could not be found in the default HII database, then ASSERT.\r
   If StringId is not found in PackageList, then ASSERT.\r
 \r
@@ -247,8 +247,8 @@ HiiLibGetString (
   CHAR8       Lang[RFC_3066_ENTRY_SIZE];\r
   CHAR8       CurrentLang[RFC_3066_ENTRY_SIZE];\r
 \r
-  ASSERT (String != NULL);\r
   ASSERT (StringSize != NULL);\r
+  ASSERT (!(*StringSize != 0 && String == NULL));\r
   ASSERT (IsHiiHandleRegistered (PackageList));\r
 \r
   HiiLibGetCurrentLanguage (CurrentLang);\r