From 56989e2d24ec0e6ed81d999548bb41a4fde68c6a Mon Sep 17 00:00:00 2001 From: Michael D Kinney Date: Mon, 13 Oct 2025 16:11:42 -0700 Subject: [PATCH] FatPkg/EnhancedFatDxe: Remove Iso639Language PR #11380 that removed the Unicode Collation Protocol introduced a logic bug in the use of GetBestLanguage(). Iso639Language would always be computed to TRUE when it should always be passed to GetBestLanguage() as FALSE once Unicode Collation Protocol is removed. Update InitializeUnicodeCollationSupportWorker() to remove the local variable Iso639Language and always call GetBestLanguage() with the Iso639Language parameter set to FALSE. Signed-off-by: Michael D Kinney --- FatPkg/EnhancedFatDxe/UnicodeCollation.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/FatPkg/EnhancedFatDxe/UnicodeCollation.c b/FatPkg/EnhancedFatDxe/UnicodeCollation.c index 45cd52345b..3113638c94 100644 --- a/FatPkg/EnhancedFatDxe/UnicodeCollation.c +++ b/FatPkg/EnhancedFatDxe/UnicodeCollation.c @@ -40,7 +40,6 @@ InitializeUnicodeCollationSupportWorker ( UINTN Index; EFI_HANDLE *Handles; EFI_UNICODE_COLLATION_PROTOCOL *Uci; - BOOLEAN Iso639Language; CHAR8 *Language; CHAR8 *BestLanguage; @@ -55,7 +54,6 @@ InitializeUnicodeCollationSupportWorker ( return Status; } - Iso639Language = (BOOLEAN)(ProtocolGuid == &gEfiUnicodeCollation2ProtocolGuid); GetEfiGlobalVariable2 (VariableName, (VOID **)&Language, NULL); ReturnStatus = EFI_UNSUPPORTED; @@ -81,7 +79,7 @@ InitializeUnicodeCollationSupportWorker ( // BestLanguage = GetBestLanguage ( Uci->SupportedLanguages, - Iso639Language, + FALSE, (Language == NULL) ? "" : Language, DefaultLanguage, NULL