Skip to content

Commit 06ee199

Browse files
authored
Remove duplicate new lines on Windows (#48)
* Replace \n with std::endl * Write code in binary mode
1 parent a20db8e commit 06ee199

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lua/luadumper.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ void glt::lua::IoThread() {
6767
continue;
6868
}
6969

70-
auto of = std::ofstream(path, glt::config::GetConfig().stealer_write_mode);
71-
of << "-- " << sanitized_filename << "\n";
72-
of << "-- Retrieved by https://github.com/lewisclark/glua-steal\n";
73-
of << entry.code << "\n\n";
70+
auto of = std::ofstream(path, glt::config::GetConfig().stealer_write_mode | std::ofstream::binary);
71+
of << "-- " << sanitized_filename << std::endl;
72+
of << "-- Retrieved by https://github.com/lewisclark/glua-steal" << std::endl;
73+
of << entry.code;
7474
}
7575

7676
shared_entries.clear();

0 commit comments

Comments
 (0)