diff options
-rw-r--r-- | bfc-amd64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bfc-amd64.c b/bfc-amd64.c index cf34b84..b2f0877 100644 --- a/bfc-amd64.c +++ b/bfc-amd64.c @@ -725,7 +725,7 @@ main (int argc, char *argv[]) FILE *output_file; #ifdef __unix__ int output_fd; - if ((output_fd = open (output_path, O_CREAT | O_WRONLY, 0777)) < 0) + if ((output_fd = open (output_path, O_CREAT|O_WRONLY|O_TRUNC, 0777)) < 0) exit_fatal ("open: %s: %s\n", output_path, strerror (errno)); if (!(output_file = fdopen (output_fd, "w"))) exit_fatal ("fdopen: %s\n", strerror (errno)); |