summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyungju Lee <leee.lee@samsung.com>2023-08-02 15:00:14 +0900
committer이형주/MDE Lab(SR)/삼성전자 <leee.lee@samsung.com>2023-08-07 19:35:48 +0900
commitf96b82cb5b95f65d35a98c6b76bca96b912a8f9a (patch)
treeb4545137e5f3ea4210cc6d7e86b989340f62aa35
parent32b332b7980c4bf9a58b4e7d3e3b125b5d9fbcc0 (diff)
downloaddiagnostics-f96b82cb5b95f65d35a98c6b76bca96b912a8f9a.tar.gz
diagnostics-f96b82cb5b95f65d35a98c6b76bca96b912a8f9a.tar.bz2
diagnostics-f96b82cb5b95f65d35a98c6b76bca96b912a8f9a.zip
-rw-r--r--src/Microsoft.Diagnostics.Repl/ConsoleService.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Microsoft.Diagnostics.Repl/ConsoleService.cs b/src/Microsoft.Diagnostics.Repl/ConsoleService.cs
index 7145a79af..5d49805c2 100644
--- a/src/Microsoft.Diagnostics.Repl/ConsoleService.cs
+++ b/src/Microsoft.Diagnostics.Repl/ConsoleService.cs
@@ -269,7 +269,8 @@ namespace Microsoft.Diagnostics.Repl
}
if (m_clearLine == null || m_clearLine.Length != Console.WindowWidth) {
- m_clearLine = "\r" + new string(' ', Console.WindowWidth - 1);
+ int consoleWidth = Console.WindowWidth > 0 ? Console.WindowWidth : 1;
+ m_clearLine = "\r" + new string(' ', consoleWidth - 1);
}
Console.Write(m_clearLine);