for (Index = 0; Index < StringCount; Index++) {\r
BlockSize += AsciiStrSize ((CHAR8 *) StringTextPtr);\r
if (CurrentStringId == StringId) {\r
+ ASSERT (BlockType != NULL && StringBlockAddr != NULL && StringTextOffset != NULL);\r
*BlockType = *BlockHdr;\r
*StringBlockAddr = BlockHdr;\r
*StringTextOffset = StringTextPtr - BlockHdr;\r
for (Index = 0; Index < StringCount; Index++) {\r
BlockSize += AsciiStrSize ((CHAR8 *) StringTextPtr);\r
if (CurrentStringId == StringId) {\r
+ ASSERT (BlockType != NULL && StringBlockAddr != NULL && StringTextOffset != NULL);\r
*BlockType = *BlockHdr;\r
*StringBlockAddr = BlockHdr;\r
*StringTextOffset = StringTextPtr - BlockHdr;\r
GetUnicodeStringTextOrSize (NULL, StringTextPtr, &StringSize);\r
BlockSize += StringSize;\r
if (CurrentStringId == StringId) {\r
+ ASSERT (BlockType != NULL && StringBlockAddr != NULL && StringTextOffset != NULL);\r
*BlockType = *BlockHdr;\r
*StringBlockAddr = BlockHdr;\r
*StringTextOffset = StringTextPtr - BlockHdr;\r
GetUnicodeStringTextOrSize (NULL, StringTextPtr, &StringSize);\r
BlockSize += StringSize;\r
if (CurrentStringId == StringId) {\r
+ ASSERT (BlockType != NULL && StringBlockAddr != NULL && StringTextOffset != NULL);\r
*BlockType = *BlockHdr;\r
*StringBlockAddr = BlockHdr;\r
*StringTextOffset = StringTextPtr - BlockHdr;\r
//\r
// Get last string ID\r
//\r
- if (StringId == (EFI_STRING_ID) (-1)) {\r
+ if (StringId == (EFI_STRING_ID) (-1) && LastStringId != NULL) {\r
*LastStringId = (EFI_STRING_ID) (CurrentStringId - 1);\r
return EFI_SUCCESS;\r
}\r