Skip to content

Commit

Permalink
Update chat.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
antimatter15 authored Mar 21, 2023
1 parent 285ca17 commit 81bd894
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -889,8 +889,10 @@ int main(int argc, char ** argv) {
// Windows console ANSI color fix
DWORD mode = 0;
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
if (hConsole && hConsole != INVALID_HANDLE_VALUE && GetConsoleMode(hConsole, &mode))
if (hConsole && hConsole != INVALID_HANDLE_VALUE && GetConsoleMode(hConsole, &mode)){
SetConsoleMode(hConsole, mode | ENABLE_VIRTUAL_TERMINAL_PROCESSING);
SetConsoleOutputCP(CP_UTF8);
}
#endif

fprintf(stderr, "%s: interactive mode on.\n", __func__);
Expand Down

0 comments on commit 81bd894

Please sign in to comment.