summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c
index d26d08f95c..b45e9a33f3 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c
@@ -205,7 +205,7 @@ EditorClearLine (
//
// if CHAR_NULL is still at position LastCol, it will cause first line error
//
- Line[(LastCol % (ARRAY_SIZE (Line) - 1)) - 1] = CHAR_NULL;
+ Line[(LastCol - 1) % (ARRAY_SIZE (Line) - 1)] = CHAR_NULL;
} else {
Line[LastCol % (ARRAY_SIZE (Line) - 1)] = CHAR_NULL;
}