Fix an issue to match invalid Language codes like "enus"
authorqhuang8 <qhuang8@de2fecce-e211-0410-80a6-f3fac2684e05>
Thu, 14 Feb 2008 02:43:38 +0000 (02:43 +0000)
committerqhuang8 <qhuang8@de2fecce-e211-0410-80a6-f3fac2684e05>
Thu, 14 Feb 2008 02:43:38 +0000 (02:43 +0000)
git-svn-id: https://edk2.tianocore.org/svn/edk2/trunk@4691 de2fecce-e211-0410-80a6-f3fac2684e05

edk2/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/DriverDiagnostics.c
edk2/Nt32Pkg/WinNtBlockIoDxe/DriverDiagnostics.c

index f3f649c..1502268 100644 (file)
@@ -135,7 +135,7 @@ IDEBusDriverDiagnosticsRunDiagnostics (
       SupportedLanguages += 3;\r
     } else {\r
       for (Index = 0; SupportedLanguages[Index] != 0 && SupportedLanguages[Index] != ';'; Index++);\r
-      if (AsciiStrnCmp(SupportedLanguages, Language, Index) == 0) {\r
+      if ((AsciiStrnCmp(SupportedLanguages, Language, Index) == 0) && (Language[Index] == 0)) {\r
         Found = TRUE;\r
         break;\r
       }\r
index 1bfa305..1060d46 100644 (file)
@@ -159,7 +159,7 @@ WinNtBlockIoDriverDiagnosticsRunDiagnostics (
       SupportedLanguages += 3;\r
     } else {\r
       for (Index = 0; SupportedLanguages[Index] != 0 && SupportedLanguages[Index] != ';'; Index++);\r
-      if (AsciiStrnCmp(SupportedLanguages, Language, Index) == 0) {\r
+      if ((AsciiStrnCmp(SupportedLanguages, Language, Index) == 0) && (Language[Index] == 0)) {\r
         Found = TRUE;\r
         break;\r
       }\r