From a71623f74c7056242ce2d152613fe90fa0aa9ff8 Mon Sep 17 00:00:00 2001 From: Tomasz Sobczyk Date: Fri, 13 Nov 2020 10:56:52 +0100 Subject: [PATCH] Add explicit read head seek to the start of the binpack file. Otherwise on MACOS the read head is placed at the end when app is specified. --- src/extra/nnue_data_binpack_format.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/extra/nnue_data_binpack_format.h b/src/extra/nnue_data_binpack_format.h index 440ae885..31c6f7bb 100644 --- a/src/extra/nnue_data_binpack_format.h +++ b/src/extra/nnue_data_binpack_format.h @@ -6717,6 +6717,9 @@ namespace binpack m_path(std::move(path)), m_file(m_path, std::ios_base::binary | std::ios_base::in | std::ios_base::out | om) { + // Necessary for MAC because app mode makes it put the reading + // head at the end. + m_file.seekg(0); } void append(const char* data, std::uint32_t size)