From: Hyungju Lee Date: Wed, 2 Aug 2023 06:00:14 +0000 (+0900) Subject: [Tizen] Patch for an exception on clearline() X-Git-Tag: accepted/tizen/unified/20230808.074053^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f96b82cb5b95f65d35a98c6b76bca96b912a8f9a;p=platform%2Fcore%2Fdotnet%2Fdiagnostics.git [Tizen] Patch for an exception on clearline() --- 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);