From 5127b4716b334a68474d227567cc1ce528e1175f Mon Sep 17 00:00:00 2001 From: qhuang8 Date: Thu, 14 Feb 2008 02:43:38 +0000 Subject: [PATCH] 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 --- IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/DriverDiagnostics.c | 2 +- Nt32Pkg/WinNtBlockIoDxe/DriverDiagnostics.c | 2 +- 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; } -- 2.39.2