From aec03d14a4afe3a5ec984a55a9002b5007acf50d Mon Sep 17 00:00:00 2001 From: Joni Savolainen Date: Sun, 16 Jan 2022 13:21:45 +0200 Subject: [PATCH] Revert "Don't clear streams when they are reopened" This reverts commit 7c1b15ecb80b8c6f305fc6c4b8ba85dfc24d311b. --- src/util/win-consoleutils.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util/win-consoleutils.cpp b/src/util/win-consoleutils.cpp index 3ffe7bf8..9a33c001 100644 --- a/src/util/win-consoleutils.cpp +++ b/src/util/win-consoleutils.cpp @@ -24,4 +24,8 @@ void reopenWindowsStreams() freopen_s(&outStream, "CONOUT$", "w+", stdout); freopen_s(&errStream, "CONOUT$", "w+", stderr); freopen_s(&inStream, "CONIN$", "r", stdin); + std::cout.clear(); + std::clog.clear(); + std::cerr.clear(); + std::cin.clear(); }