Skip to content

Commit

Permalink
Remove duplicate new lines on Windows (#48)
Browse files Browse the repository at this point in the history
* Replace \n with std::endl

* Write code in binary mode
  • Loading branch information
lewisclark authored Nov 24, 2022
1 parent a20db8e commit 06ee199
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lua/luadumper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 06ee199

Please # to comment.