summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Variable
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/Variable')
-rw-r--r--MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c2
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
index d017f802e3..cbf953dfe9 100644
--- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
+++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
@@ -571,7 +571,7 @@ AutoUpdateLangVariable(
FindVariable(L"PlatformLang", &gEfiGlobalVariableGuid, &Variable, (VARIABLE_GLOBAL *)mVariableModuleGlobal);
Status = UpdateVariable(L"PlatformLang", &gEfiGlobalVariableGuid,
- BestPlatformLang, AsciiStrLen (BestPlatformLang), Attributes, &Variable);
+ BestPlatformLang, AsciiStrSize (BestPlatformLang), Attributes, &Variable);
DEBUG((EFI_D_INFO, "Variable Driver Auto Update Lang, Lang:%a, PlatformLang:%a\n", BestLang, BestPlatformLang));
ASSERT_EFI_ERROR(Status);
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
index a1c99677f9..02f146895f 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -1308,7 +1308,7 @@ AutoUpdateLangVariable(
FindVariable(L"PlatformLang", &gEfiGlobalVariableGuid, &Variable, (VARIABLE_GLOBAL *)mVariableModuleGlobal);
Status = UpdateVariable(L"PlatformLang", &gEfiGlobalVariableGuid,
- BestPlatformLang, AsciiStrLen (BestPlatformLang), Attributes, &Variable);
+ BestPlatformLang, AsciiStrSize (BestPlatformLang), Attributes, &Variable);
DEBUG((EFI_D_INFO, "Variable Driver Auto Update Lang, Lang:%a, PlatformLang:%a\n", BestLang, BestPlatformLang));
ASSERT_EFI_ERROR(Status);