From 1df5c64cf3e0362da9a301228f3a09cdda1f6770 Mon Sep 17 00:00:00 2001 From: ydong10 Date: Tue, 7 Aug 2012 00:47:06 +0000 Subject: [PATCH] Fix a width count error in ClearScreen function. Signed-off-by: Eric Dong Reviewed-by: Jaben Carsey git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13596 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Application/Shell/ConsoleLogger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ShellPkg/Application/Shell/ConsoleLogger.c b/ShellPkg/Application/Shell/ConsoleLogger.c index 1c5ad7def2..fc347717d3 100644 --- a/ShellPkg/Application/Shell/ConsoleLogger.c +++ b/ShellPkg/Application/Shell/ConsoleLogger.c @@ -1028,7 +1028,7 @@ ConsoleLoggerClearScreen ( // Record console output history // if (!EFI_ERROR (Status)) { - Screen = &ConsoleInfo->Buffer[(ConsoleInfo->ColsPerScreen + 1) * ConsoleInfo->CurrentStartRow]; + Screen = &ConsoleInfo->Buffer[(ConsoleInfo->ColsPerScreen + 2) * ConsoleInfo->CurrentStartRow]; Attributes = &ConsoleInfo->Attributes[ConsoleInfo->ColsPerScreen * ConsoleInfo->CurrentStartRow]; for ( Row = ConsoleInfo->OriginalStartRow ; Row < (ConsoleInfo->RowsPerScreen * ConsoleInfo->ScreenCount) @@ -1046,7 +1046,7 @@ ConsoleLoggerClearScreen ( // // Skip the NULL on each column end in text buffer only // - Screen++; + Screen += 2; } ConsoleInfo->HistoryMode.CursorColumn = 0; ConsoleInfo->HistoryMode.CursorRow = 0;