From a4e5dac81ad480f2ee026f35a7c3ad804447256a Mon Sep 17 00:00:00 2001 From: Peter Heywood Date: Thu, 21 Nov 2024 13:51:56 +0000 Subject: [PATCH] Telemetry: Open telemetry cfg file in binary mode --- src/flamegpu/io/Telemetry.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flamegpu/io/Telemetry.cpp b/src/flamegpu/io/Telemetry.cpp index 73d48c24a..cc2b292ee 100644 --- a/src/flamegpu/io/Telemetry.cpp +++ b/src/flamegpu/io/Telemetry.cpp @@ -362,7 +362,7 @@ std::string Telemetry::getUserId() { // Check if the file exists if (std::filesystem::exists(filePath)) { - std::ifstream file(filePath); + std::ifstream file(filePath, std::ios_base::binary); if (file.is_open()) { std::string cached_id; std::getline(file, cached_id); // overwrite existing Id @@ -378,7 +378,7 @@ std::string Telemetry::getUserId() { } } - std::ofstream file(filePath); + std::ofstream file(filePath, std::ios_base::binary); if (file.is_open()) { file << userId; file.close();