From 7b06bd538174e7d8b6c7f8efc5e2b661b77b4914 Mon Sep 17 00:00:00 2001
From: Dominik Loidolt <dominik.loidolt@univie.ac.at>
Date: Wed, 26 Jan 2022 15:44:41 +0100
Subject: [PATCH] add file access mode flag "b". This flag has no effect on
 POSIX systems, but on Windows it disables special handling of '\n' and '\x1A'

---
 lib/cmp_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/cmp_io.c b/lib/cmp_io.c
index bbd44c1..9f7fd72 100644
--- a/lib/cmp_io.c
+++ b/lib/cmp_io.c
@@ -1148,7 +1148,7 @@ ssize_t read_file8(const char *file_name, uint8_t *buf, uint32_t n_word, int ver
 		abort();
 
 	errno = 0;
-	fp = fopen(file_name, "r");
+	fp = fopen(file_name, "rb");
 	if (fp == NULL)
 		goto fail;
 
-- 
GitLab