From 7d112a394c1a2725d043ee5bc9e58daaa88a94ac Mon Sep 17 00:00:00 2001 From: David Given Date: Mon, 18 Jul 2022 20:25:56 +0200 Subject: [PATCH] Open EM files in binary mode. --- util/ass/ass00.c | 10 +++++----- util/ass/assrl.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/util/ass/ass00.c b/util/ass/ass00.c index 2459ce7a5..a45f3d63b 100644 --- a/util/ass/ass00.c +++ b/util/ass/ass00.c @@ -153,7 +153,7 @@ static void argument(char *arg) return; } curfile = arg; /* for error messages etc. */ - if ((ifile = fopen(arg, "r")) == NULL) + if ((ifile = fopen(arg, "rb")) == NULL) { error("can't open %s", arg); return; @@ -385,10 +385,10 @@ void init_files(void) * It has the nice property of generating truly unique names. */ - tfile = fopen(tmpfil(), "w+"); - dfile = fopen(tmpfil(), "w+"); - rtfile = fopen(tmpfil(), "w+"); - rdfile = fopen(tmpfil(), "w+"); + tfile = fopen(tmpfil(), "wb+"); + dfile = fopen(tmpfil(), "wb+"); + rtfile = fopen(tmpfil(), "wb+"); + rdfile = fopen(tmpfil(), "wb+"); } void initproc(void) diff --git a/util/ass/assrl.c b/util/ass/assrl.c index b748d4718..2da8645c6 100644 --- a/util/ass/assrl.c +++ b/util/ass/assrl.c @@ -127,7 +127,7 @@ void copyout(void) if (remtext != 0) remtext = wordsize - remtext; - if ((ifile = fopen(eout, "w")) == 0) + if ((ifile = fopen(eout, "wb")) == 0) fatal("can't create e.out"); rewind(tfile);