]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/DriverDiagnostics.c
Fix an issue to match invalid Language codes like "enus"
[mirror_edk2.git] / IntelFrameworkModulePkg / Bus / Pci / IdeBusDxe / DriverDiagnostics.c
index f3f649c163e2c8fbc4162e744925c5da2f939171..1502268c20996490956454231a8c9f61ca0b581a 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