incorrect error check on GetStdHandle()
Likely inconsequential as GetConsoleMode() should return 0 when given an invalid handle.
This commit is contained in:
@@ -247,7 +247,7 @@ int isATTY(FILE* fp)
|
||||
else if(fp==stderr)
|
||||
hand = GetStdHandle(STD_ERROR_HANDLE);
|
||||
#ifdef ENABLE_VIRTUAL_TERMINAL_PROCESSING
|
||||
if(hand && GetConsoleMode(hand, &mode)) {
|
||||
if(hand!=INVALID_HANDLE_VALUE && GetConsoleMode(hand, &mode)) {
|
||||
(void)SetConsoleMode(hand, mode|ENABLE_VIRTUAL_TERMINAL_PROCESSING);
|
||||
mode = 0u;
|
||||
if(GetConsoleMode(hand, &mode) && (mode&ENABLE_VIRTUAL_TERMINAL_PROCESSING))
|
||||
|
||||
Reference in New Issue
Block a user