summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2008-02-14 02:43:38 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2008-02-14 02:43:38 +0000
commit5127b4716b334a68474d227567cc1ce528e1175f (patch)
tree5a71cf2dca36dd35e0528ec586039ec2988a579a
parentb9a615fa77c31b7fd6710ca1c5adba27a9638878 (diff)
downloadedk2-platforms-5127b4716b334a68474d227567cc1ce528e1175f.tar.xz
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
-rw-r--r--IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/DriverDiagnostics.c2
-rw-r--r--Nt32Pkg/WinNtBlockIoDxe/DriverDiagnostics.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/DriverDiagnostics.c b/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/DriverDiagnostics.c
index f3f649c163..1502268c20 100644
--- a/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/DriverDiagnostics.c
+++ b/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/DriverDiagnostics.c
@@ -135,7 +135,7 @@ IDEBusDriverDiagnosticsRunDiagnostics (
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;
}
diff --git a/Nt32Pkg/WinNtBlockIoDxe/DriverDiagnostics.c b/Nt32Pkg/WinNtBlockIoDxe/DriverDiagnostics.c
index 1bfa3059b5..1060d46001 100644
--- a/Nt32Pkg/WinNtBlockIoDxe/DriverDiagnostics.c
+++ b/Nt32Pkg/WinNtBlockIoDxe/DriverDiagnostics.c
@@ -159,7 +159,7 @@ WinNtBlockIoDriverDiagnosticsRunDiagnostics (
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;
}