Fix a bug that L"PlatformLang" must be a null-terminated ASCII string according to UEFI spec.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8232 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8 2009-05-04 05:55:56 +00:00
parent 8243b089ab
commit a1373617d6
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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);