fix:修正win编译

This commit is contained in:
taynpg 2025-02-10 23:19:28 +08:00
parent a00a49809e
commit f6a975b984

View File

@ -685,7 +685,7 @@ char* fc_readline()
void enable_cur() void enable_cur()
{ {
#if defined(OS_WINDOWS) #if defined(OS_WINDOWS)
hConsole = GetStdHandle(STD_OUTPUT_HANDLE); auto hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
if (hConsole == NULL) { if (hConsole == NULL) {
fprintf(stderr, "[ERROR] Couldn't handle terminal\n"); fprintf(stderr, "[ERROR] Couldn't handle terminal\n");
exit(1); exit(1);
@ -702,7 +702,7 @@ void enable_cur()
void disable_cur() void disable_cur()
{ {
#if defined(OS_WINDOWS) #if defined(OS_WINDOWS)
hConsole = GetStdHandle(STD_OUTPUT_HANDLE); auto hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
if (hConsole == NULL) { if (hConsole == NULL) {
fprintf(stderr, "[ERROR] Couldn't handle terminal\n"); fprintf(stderr, "[ERROR] Couldn't handle terminal\n");
exit(1); exit(1);