From 634aa59d20747ebbe5e230b80158fdc88b3bc485 Mon Sep 17 00:00:00 2001 From: qhuang8 Date: Fri, 1 Feb 2008 15:06:59 +0000 Subject: [PATCH] Fix a bug in LookupUnicodeStringTable2() to mismatch invalid language code like "enus" with "en" git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4655 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Library/UefiLib/UefiLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdePkg/Library/UefiLib/UefiLib.c b/MdePkg/Library/UefiLib/UefiLib.c index 12a717aa27..d7d7043a23 100644 --- a/MdePkg/Library/UefiLib/UefiLib.c +++ b/MdePkg/Library/UefiLib/UefiLib.c @@ -713,7 +713,7 @@ LookupUnicodeString2 ( SupportedLanguages += 3; } else { for (Index = 0; SupportedLanguages[Index] != 0 && SupportedLanguages[Index] != ';'; Index++); - if (AsciiStrnCmp(SupportedLanguages, Language, Index) == 0) { + if ((AsciiStrnCmp(SupportedLanguages, Language, Index) == 0) && (Language[Index] == 0)) { Found = TRUE; break; }