X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=ShellPkg%2FLibrary%2FUefiShellDebug1CommandsLib%2FUefiShellDebug1CommandsLib.c;h=b45e9a33f393529bfbb33ef9715c108d43e5e232;hp=d26d08f95c14c365ce2c6990eb55681172978950;hb=452676ffd895651683dcf19535e65294ff1d00d0;hpb=704b71d7e11f115a3b5b03471d6420a7a70f1585 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; }