From ffafc5d1af5ca2db95f59033bf457d55173b9a63 Mon Sep 17 00:00:00 2001 From: REDxEYE Date: Thu, 6 Aug 2020 16:52:08 +0300 Subject: [PATCH] Fixed export error --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 969cf49..3d08d38 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -157,7 +157,7 @@ class MainLayer : public omc::layer { std::vector file_data = archive_array.query_file(filename); - std::ofstream output_file { full_path, std::ios::trunc }; + std::ofstream output_file { full_path, std::ios::binary }; output_file.write(reinterpret_cast(file_data.data()), file_data.size()); std::cout << "File was exported to: " << full_path << "\n"; @@ -278,4 +278,4 @@ int main() { app->push_layer(std::make_shared(app.get())); app->run(); -} \ No newline at end of file +}