Skip to content

Commit

Permalink
Fix buffer not flushing immediately on Windows platform (estkme-group#58
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ShiinaSekiu authored and ocd0711 committed May 7, 2024
1 parent 8c81dc9 commit 922edc1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/jprint.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ void jprint_error(const char *function_name, const char *detail)
cJSON_Delete(jroot);

printf("%s\n", jstr);
fflush(stdout);
free(jstr);
}

Expand All @@ -48,6 +49,7 @@ void jprint_progress(const char *function_name)
cJSON_Delete(jroot);

printf("%s\n", jstr);
fflush(stdout);
free(jstr);
}

Expand Down Expand Up @@ -76,5 +78,6 @@ void jprint_success(cJSON *jdata)
cJSON_Delete(jroot);

printf("%s\n", jstr);
fflush(stdout);
free(jstr);
}

0 comments on commit 922edc1

Please sign in to comment.