wasn't setting stderr fileno...

This commit is contained in:
Kelvin Sherlock 2019-03-26 23:37:16 -04:00
parent 3ef3173c36
commit 91c24bbf8b

View File

@ -193,7 +193,6 @@ void win_init_console(void) {
//SetConsoleTextAttribute(h, BACKGROUND_BLUE | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
fd = _open_osfhandle((intptr_t)h, _O_TEXT);
#if DUPE
if (fd >= 0 && fd != 1) {
@ -222,10 +221,11 @@ void win_init_console(void) {
close(fd);
}
#else
stdout->_file = fd;
stderr->_file = fd;
#endif
}
#if 0
dbg = fopen("debug.txt", "a+");
h = GetStdHandle(STD_INPUT_HANDLE);