UINT8 *Destination;\r
UINTN Index;\r
BOOLEAN Finished;\r
+ UINTN SizeofLanguage;\r
+ UINTN SizeofString;\r
\r
StringPack = (EFI_HII_STRING_PACK *) StringBuffer;\r
Finished = FALSE;\r
//\r
// Pointing to a new string pack location\r
//\r
+ SizeofLanguage = EfiStrSize (Language);\r
+ SizeofString = EfiStrSize (String);\r
StringPackBuffer->Header.Length = (UINT32)\r
(\r
sizeof (EFI_HII_STRING_PACK) -\r
sizeof (EFI_STRING) +\r
sizeof (RELOFST) +\r
sizeof (RELOFST) +\r
- EfiStrSize (Language) +\r
- EfiStrSize (String)\r
+ SizeofLanguage +\r
+ SizeofString\r
);\r
StringPackBuffer->Header.Type = EFI_HII_STRING;\r
StringPackBuffer->LanguageNameString = (UINT16) ((UINTN) &PackDestination[3] - (UINTN) StringPackBuffer);\r