EFI_UGA_DRAW_PROTOCOL *UgaDraw;\r
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *Sto;\r
EFI_HANDLE ConsoleHandle;\r
+ UINTN Width;\r
+ UINTN Height;\r
+ UINTN Delta;\r
\r
HorizontalResolution = 0;\r
VerticalResolution = 0;\r
//\r
ASSERT (RowInfoArraySize <= 1);\r
\r
+ if (RowInfoArraySize != 0) {\r
+ Width = RowInfoArray[0].LineWidth;\r
+ Height = RowInfoArray[0].LineHeight;\r
+ Delta = Blt->Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL);\r
+ } else {\r
+ Width = 0;\r
+ Height = 0;\r
+ Delta = 0;\r
+ }\r
Status = UgaDraw->Blt (\r
UgaDraw,\r
(EFI_UGA_PIXEL *) Blt->Image.Bitmap,\r
PointY,\r
PointX,\r
PointY,\r
- RowInfoArray[0].LineWidth,\r
- RowInfoArray[0].LineHeight,\r
- Blt->Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)\r
+ Width,\r
+ Height,\r
+ Delta\r
);\r
} else {\r
goto Error;\r
//\r
// Calculate the number of actual printed characters\r
//\r
- PrintNum = RowInfoArray[0].EndIndex - RowInfoArray[0].StartIndex + 1;\r
+ if (RowInfoArraySize != 0) {\r
+ PrintNum = RowInfoArray[0].EndIndex - RowInfoArray[0].StartIndex + 1;\r
+ } else {\r
+ PrintNum = 0;\r
+ }\r
\r
FreePool (RowInfoArray);\r
FreePool (Blt);\r