Implementation for EFI_HII_FONT_PROTOCOL.\r
\r
\r
-Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
break;\r
\r
case EFI_HII_GIBT_EXT1:\r
- BlockPtr += *(BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK) + sizeof (UINT8));\r
+ BlockPtr += *(UINT8*)((UINTN)BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK) + sizeof (UINT8));\r
break;\r
case EFI_HII_GIBT_EXT2:\r
CopyMem (\r
&Length16,\r
- BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK) + sizeof (UINT8),\r
+ (UINT8*)((UINTN)BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK) + sizeof (UINT8)),\r
sizeof (UINT16)\r
);\r
BlockPtr += Length16;\r
case EFI_HII_GIBT_EXT4:\r
CopyMem (\r
&Length32,\r
- BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK) + sizeof (UINT8),\r
+ (UINT8*)((UINTN)BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK) + sizeof (UINT8)),\r
sizeof (UINT32)\r
);\r
BlockPtr += Length32;\r
BufferLen = BITMAP_LEN_1_BIT (LocalCell.Width, LocalCell.Height);\r
if (CharCurrent == CharValue) {\r
return WriteOutputParam (\r
- BlockPtr + sizeof (EFI_HII_GIBT_GLYPH_BLOCK) - sizeof (UINT8),\r
+ (UINT8*)((UINTN)BlockPtr + sizeof (EFI_HII_GIBT_GLYPH_BLOCK) - sizeof (UINT8)),\r
BufferLen,\r
&LocalCell,\r
GlyphBuffer,\r
return TRUE;\r
}\r
\r
+ SystemDefault = NULL;\r
+ DefaultLen = 0;\r
+\r
Status = GetSystemFont (Private, &SystemDefault, &DefaultLen);\r
ASSERT_EFI_ERROR (Status);\r
+ ASSERT ((SystemDefault != NULL) && (DefaultLen != 0));\r
\r
//\r
// Record the system default info.\r
SysFontFlag = IsSystemFontInfo (Private, (EFI_FONT_DISPLAY_INFO *) StringInfo, &SystemDefault, NULL);\r
\r
if (SysFontFlag) {\r
+ ASSERT (SystemDefault != NULL);\r
FontInfo = NULL;\r
Height = SystemDefault->FontInfo.FontSize;\r
BaseLine = SystemDefault->FontInfo.FontSize;\r
Foreground = StringInfoOut->ForegroundColor;\r
Background = StringInfoOut->BackgroundColor;\r
} else {\r
+ ASSERT (SystemDefault != NULL);\r
Foreground = SystemDefault->ForegroundColor;\r
Background = SystemDefault->BackgroundColor;\r
}\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
+ StringInfoOutLen = 0;\r
FontInfo = NULL;\r
SystemDefault = NULL;\r
LocalFontHandle = NULL;\r