summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ShellPkg/Library/UefiShellLib/UefiShellLib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ShellPkg/Library/UefiShellLib/UefiShellLib.c b/ShellPkg/Library/UefiShellLib/UefiShellLib.c
index 85a5d44f08..1929349b20 100644
--- a/ShellPkg/Library/UefiShellLib/UefiShellLib.c
+++ b/ShellPkg/Library/UefiShellLib/UefiShellLib.c
@@ -2606,10 +2606,12 @@ InternalPrintTo (
return (gEfiShellProtocol->WriteFile(gEfiShellParametersProtocol->StdOut, &Size, (VOID*)String));
}
if (mEfiShellInterface != NULL) {
+ if (mEfiShellInterface->RedirArgc == 0) {
//
// Divide in half for old shell. Must be string length not size.
- //
- Size /= 2;
+ //
+ Size /=2; // Divide in half only when no redirection.
+ }
return (mEfiShellInterface->StdOut->Write(mEfiShellInterface->StdOut, &Size, (VOID*)String));
}
ASSERT(FALSE);