From 1af8e75191c502770a0578037502d38fe3c6cdc9 Mon Sep 17 00:00:00 2001 From: pionere Date: Sat, 25 Jan 2025 15:11:19 +0100 Subject: [PATCH] prevent the overwrite of existing mpq files (requires C++17) fixes #7672 --- Source/mpq/mpq_writer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/mpq/mpq_writer.cpp b/Source/mpq/mpq_writer.cpp index 9d5a3b2b1bb..8f2dfc7ebe3 100644 --- a/Source/mpq/mpq_writer.cpp +++ b/Source/mpq/mpq_writer.cpp @@ -93,7 +93,7 @@ MpqWriter::MpqWriter(const char *path) LogVerbose("Opening {}", path); std::string error; bool exists = FileExists(path); - const char *mode = "wb"; + const char *mode = "wbx"; if (exists) { mode = "r+b"; std::uintmax_t fileSize;