In PrintXY() and AsciiPrintXY(), the number of chartacter returned is at most PcdUefiLibMaxPrintBufferSize, and will return the number of characters actually displayed on the screen not includng partial characters that may be clipped by the right edge of the display.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8289 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
eric_tian 2009-05-11 06:58:28 +00:00
parent 5796de6792
commit e74738b1c3
1 changed files with 1 additions and 2 deletions

View File

@ -419,8 +419,7 @@ InternalPrintGraphic (
LineBufferLen = sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * HorizontalResolution * EFI_GLYPH_HEIGHT; LineBufferLen = sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * HorizontalResolution * EFI_GLYPH_HEIGHT;
if (EFI_GLYPH_WIDTH * EFI_GLYPH_HEIGHT * sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * PrintNum > LineBufferLen) { if (EFI_GLYPH_WIDTH * EFI_GLYPH_HEIGHT * sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * PrintNum > LineBufferLen) {
Status = EFI_INVALID_PARAMETER; PrintNum = HorizontalResolution / EFI_GLYPH_WIDTH;
goto Error;
} }
Blt = (EFI_IMAGE_OUTPUT *) AllocateZeroPool (sizeof (EFI_IMAGE_OUTPUT)); Blt = (EFI_IMAGE_OUTPUT *) AllocateZeroPool (sizeof (EFI_IMAGE_OUTPUT));