Fix an issue to match invalid Language codes like "enus"

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4691 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8 2008-02-14 02:43:38 +00:00
parent b9a615fa77
commit 5127b4716b
2 changed files with 2 additions and 2 deletions

View File

@ -135,7 +135,7 @@ IDEBusDriverDiagnosticsRunDiagnostics (
SupportedLanguages += 3; SupportedLanguages += 3;
} else { } else {
for (Index = 0; SupportedLanguages[Index] != 0 && SupportedLanguages[Index] != ';'; Index++); 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; Found = TRUE;
break; break;
} }

View File

@ -159,7 +159,7 @@ WinNtBlockIoDriverDiagnosticsRunDiagnostics (
SupportedLanguages += 3; SupportedLanguages += 3;
} else { } else {
for (Index = 0; SupportedLanguages[Index] != 0 && SupportedLanguages[Index] != ';'; Index++); 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; Found = TRUE;
break; break;
} }