aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli/compress.cpp
diff options
context:
space:
mode:
authorVolker Aßmann <[email protected]>2017-06-06 19:26:45 +0200
committerVolker Aßmann <[email protected]>2017-06-06 19:26:45 +0200
commit74ce98cd71dee48b8260dfe6d0de5d8003d16b23 (patch)
tree37e35a79881b950c0468502c9ed517c76d0106dd /src/cli/compress.cpp
parentc4514146df5461763bb4164fc49ac41474e81b29 (diff)
Fix missing binary mode flag on compression ofstreams
Diffstat (limited to 'src/cli/compress.cpp')
-rw-r--r--src/cli/compress.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cli/compress.cpp b/src/cli/compress.cpp
index e0881d025..c60a33921 100644
--- a/src/cli/compress.cpp
+++ b/src/cli/compress.cpp
@@ -62,7 +62,7 @@ class Compress final : public Command
}
const std::string out_file = output_filename(in_file, comp_type);
- std::ofstream out(out_file);
+ std::ofstream out(out_file, std::ios::binary);
if(!in.good())
{
throw CLI_IO_Error("writing", out_file);
@@ -134,7 +134,7 @@ class Decompress final : public Command
throw CLI_Error_Unsupported("Decompression", suffix);
}
- std::ofstream out(out_file);
+ std::ofstream out(out_file, std::ios::binary);
if(!out.good())
{
throw CLI_IO_Error("writing", out_file);