Init the var too

This commit is contained in:
anzz1 2023-03-18 22:21:58 +02:00 committed by GitHub
parent f69062f68e
commit 1b19586681
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -889,7 +889,7 @@ int main(int argc, char ** argv) {
signal(SIGINT, sigint_handler);
// Windows console ANSI color fix
DWORD mode;
DWORD mode = 0;
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
if (hConsole && hConsole != INVALID_HANDLE_VALUE && GetConsoleMode(hConsole, &mode))
SetConsoleMode(hConsole, mode | ENABLE_VIRTUAL_TERMINAL_PROCESSING);