win32 SetConsoleTextAttribute doesn't know what COLOR_RESET (-1) is

develop
Quietust 2012-03-27 13:22:45 -05:00
parent 2ac562d4d7
commit 6656852fff
1 changed files with 1 additions and 1 deletions

@ -179,7 +179,7 @@ namespace DFHack
void color(int index) void color(int index)
{ {
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hConsole, index); SetConsoleTextAttribute(hConsole, index == color_ostream::COLOR_RESET ? default_attributes : index);
} }
void reset_color( void ) void reset_color( void )