Fix a bug in LookupUnicodeStringTable2() to mismatch invalid language code like ...
authorqhuang8 <qhuang8@de2fecce-e211-0410-80a6-f3fac2684e05>
Fri, 1 Feb 2008 15:06:59 +0000 (15:06 +0000)
committerqhuang8 <qhuang8@de2fecce-e211-0410-80a6-f3fac2684e05>
Fri, 1 Feb 2008 15:06:59 +0000 (15:06 +0000)
git-svn-id: https://edk2.tianocore.org/svn/edk2/trunk@4655 de2fecce-e211-0410-80a6-f3fac2684e05

edk2/MdePkg/Library/UefiLib/UefiLib.c

index 12a717a..d7d7043 100644 (file)
@@ -713,7 +713,7 @@ LookupUnicodeString2 (
       SupportedLanguages += 3;\r
     } else {\r
       for (Index = 0; SupportedLanguages[Index] != 0 && SupportedLanguages[Index] != ';'; Index++);\r
-      if (AsciiStrnCmp(SupportedLanguages, Language, Index) == 0) {\r
+      if ((AsciiStrnCmp(SupportedLanguages, Language, Index) == 0) && (Language[Index] == 0)) {\r
         Found = TRUE;\r
         break;\r
       }\r