From fe9b04bd065dbeaaedc51a8049476f85a6bce8dd Mon Sep 17 00:00:00 2001 From: Solokiller Date: Thu, 22 Jul 2021 19:35:09 +0200 Subject: [PATCH] Open exclusive read with correct binary mode on non-Windows platforms #163 --- src/tools/hlam/utility/IOUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/hlam/utility/IOUtils.cpp b/src/tools/hlam/utility/IOUtils.cpp index ad0b785d..5aca6abe 100644 --- a/src/tools/hlam/utility/IOUtils.cpp +++ b/src/tools/hlam/utility/IOUtils.cpp @@ -65,6 +65,6 @@ FILE* utf8_exclusive_read_fopen(const char* filename, bool asBinary) return file; #else - return utf8_fopen(filename, "r"); + return utf8_fopen(filename, asBinary ? "r" : "rb"); #endif }