Skip to content

Commit 3ea5055

Browse files
committed
Open logfiles and cue files in binary mode
Windows has long since supported UNIX-style line endings. To make logfiles reproducable amongst all platforms, standardize "\n" line endings by opening files in binary mode.
1 parent eb219a4 commit 3ea5055

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cue_writer.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ int cyanrip_cue_init(cyanrip_ctx *ctx)
2626
&crip_fmt_info[ctx->settings.outputs[i]],
2727
NULL);
2828

29-
ctx->cuefile[i] = fopen(cuefile, "w+");
29+
ctx->cuefile[i] = fopen(cuefile, "wb+");
3030

3131
if (!ctx->cuefile[i]) {
3232
cyanrip_log(ctx, 0, "Couldn't open path \"%s\" for writing: %s!\n"

src/cyanrip_log.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ int cyanrip_log_init(cyanrip_ctx *ctx)
368368
&crip_fmt_info[ctx->settings.outputs[i]],
369369
NULL);
370370

371-
ctx->logfile[i] = fopen(logfile, "w+");
371+
ctx->logfile[i] = fopen(logfile, "wb+");
372372

373373
if (!ctx->logfile[i]) {
374374
cyanrip_log(ctx, 0, "Couldn't open path \"%s\" for writing: %s!\n"

0 commit comments

Comments
 (0)