fix:处理当不能获取终端信息时不退出程序

This commit is contained in:
taynpg 2025-04-13 13:21:39 +08:00
parent 4b6612cc63
commit 2a59b1066a

View File

@ -192,11 +192,9 @@ void recovery_terminal_color()
HANDLE h_console = GetStdHandle(STD_OUTPUT_HANDLE);
if (h_console == NULL) {
fprintf(stderr, "[ERROR] Couldn't handle terminal\n");
exit(1);
}
if (SetConsoleTextAttribute(h_console, DEFAULT_MAIN_COLOR) == 0) {
fprintf(stderr, "[ERROR] Couldn't set terminal color\n");
exit(1);
}
#else
fc_lock_print();