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
This commit is contained in:
qhuang8 2008-02-01 15:06:59 +00:00
parent 41c7f55141
commit 634aa59d20
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}