From bc5b7bc975d2f75858b9872ef718e373183c3e4c Mon Sep 17 00:00:00 2001 From: Genoil Date: Tue, 24 Mar 2015 07:29:58 +0100 Subject: [PATCH] Win32 requires ios::binary when writing dag file. --- libdevcore/CommonIO.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdevcore/CommonIO.cpp b/libdevcore/CommonIO.cpp index 4fa132073..0ebc91b15 100644 --- a/libdevcore/CommonIO.cpp +++ b/libdevcore/CommonIO.cpp @@ -112,6 +112,6 @@ string dev::contentsString(std::string const& _file) void dev::writeFile(std::string const& _file, bytesConstRef _data) { - ofstream(_file, ios::trunc).write((char const*)_data.data(), _data.size()); + ofstream(_file, ios::trunc | ios::binary).write((char const*)_data.data(), _data.size()); }