From 9c72568e002e53b8114406eb4bd5369af2049e3d Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Sun, 21 Jan 2024 15:12:04 +0300 Subject: [PATCH] template.c: flush stdout before the `perror` call --- src/template.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/template.c b/src/template.c index e6c528d..cad211f 100644 --- a/src/template.c +++ b/src/template.c @@ -147,6 +147,7 @@ main(void) // 1. open file FILE* output_file = fopen(OUTPUT_FILE, "wb"); if (output_file == NULL) { + fflush(stdout); perror("fopen"); return 1; }