Clear std stream errors when reopening

Prior errors are no longer relevant.

Shouldn't make a difference unless you've tried printing something before the streams were set up.
pull/3235/head
AnyOldName3 1 month ago
parent 901a17ab81
commit a7021bf9cc

@ -73,16 +73,19 @@ namespace Debug
{
_wfreopen(L"CON", L"r", stdin);
freopen("CON", "r", stdin);
std::cin.clear();
}
if (!outRedirected)
{
_wfreopen(L"CON", L"w", stdout);
freopen("CON", "w", stdout);
std::cout.clear();
}
if (!errRedirected)
{
_wfreopen(L"CON", L"w", stderr);
freopen("CON", "w", stderr);
std::cerr.clear();
}
return true;

Loading…
Cancel
Save