Console.Unix: fix inverted TreatControlCAsInput (#42432)
authorTom Deseyn <tom.deseyn@gmail.com>
Sat, 19 Sep 2020 00:50:29 +0000 (02:50 +0200)
committerGitHub <noreply@github.com>
Sat, 19 Sep 2020 00:50:29 +0000 (17:50 -0700)
The logical negation was unintentionally removed while refactoring.

src/libraries/System.Console/src/System/ConsolePal.Unix.cs

index 6393a06..6ef8f1c 100644 (file)
@@ -151,7 +151,7 @@ namespace System
                 if (!Console.IsInputRedirected)
                 {
                     EnsureConsoleInitialized();
-                    if (Interop.Sys.SetSignalForBreak(Convert.ToInt32(value)) == 0)
+                    if (Interop.Sys.SetSignalForBreak(Convert.ToInt32(!value)) == 0)
                         throw Interop.GetExceptionForIoErrno(Interop.Sys.GetLastErrorInfo());
                 }
             }