From 06ee19986c5ddbcb915154ceff26ca020f1119f9 Mon Sep 17 00:00:00 2001 From: Lewis Clark Date: Thu, 24 Nov 2022 16:05:08 +0000 Subject: [PATCH] Remove duplicate new lines on Windows (#48) * Replace \n with std::endl * Write code in binary mode --- src/lua/luadumper.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lua/luadumper.cpp b/src/lua/luadumper.cpp index 86cb35a..870c4bd 100644 --- a/src/lua/luadumper.cpp +++ b/src/lua/luadumper.cpp @@ -67,10 +67,10 @@ void glt::lua::IoThread() { continue; } - auto of = std::ofstream(path, glt::config::GetConfig().stealer_write_mode); - of << "-- " << sanitized_filename << "\n"; - of << "-- Retrieved by https://github.com/lewisclark/glua-steal\n"; - of << entry.code << "\n\n"; + auto of = std::ofstream(path, glt::config::GetConfig().stealer_write_mode | std::ofstream::binary); + of << "-- " << sanitized_filename << std::endl; + of << "-- Retrieved by https://github.com/lewisclark/glua-steal" << std::endl; + of << entry.code; } shared_entries.clear();