From f96b82cb5b95f65d35a98c6b76bca96b912a8f9a Mon Sep 17 00:00:00 2001 From: Hyungju Lee Date: Wed, 2 Aug 2023 15:00:14 +0900 Subject: [PATCH] [Tizen] Patch for an exception on clearline() --- src/Microsoft.Diagnostics.Repl/ConsoleService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.34.1