summaryrefslogtreecommitdiffhomepage
path: root/Stars45/NetLobbyServer.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-02-07 00:36:48 +0100
committerAki <please@ignore.pl>2022-02-07 00:36:48 +0100
commit865eaca27d5ea0eb7f9ad93ad3d169d192080386 (patch)
tree447fab11ef4e9f5ac5ed81624d4ec5d0bb0ec94b /Stars45/NetLobbyServer.cpp
parentac10eabede2533de74c0dd6714b6cd5d02f6b914 (diff)
downloadstarshatter-865eaca27d5ea0eb7f9ad93ad3d169d192080386.zip
starshatter-865eaca27d5ea0eb7f9ad93ad3d169d192080386.tar.gz
starshatter-865eaca27d5ea0eb7f9ad93ad3d169d192080386.tar.bz2
Changed all file opening modes to be binary to have consistent newlines
Diffstat (limited to 'Stars45/NetLobbyServer.cpp')
-rw-r--r--Stars45/NetLobbyServer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Stars45/NetLobbyServer.cpp b/Stars45/NetLobbyServer.cpp
index c3817c8..a0014e4 100644
--- a/Stars45/NetLobbyServer.cpp
+++ b/Stars45/NetLobbyServer.cpp
@@ -202,7 +202,7 @@ NetLobbyServer::LoadMOTD()
motd.destroy();
FILE* f;
- fopen_s(&f, "motd.txt", "r");
+ fopen_s(&f, "motd.txt", "rb");
if (f) {
char line[256];
@@ -595,7 +595,7 @@ void
NetLobbyServer::SaveChat()
{
FILE* f;
- fopen_s(&f, "chat.txt", "w");
+ fopen_s(&f, "chat.txt", "wb");
if (f) {
for (int i = 0; i < chat_log.size(); i++) {
NetChatEntry* c = chat_log[i];
@@ -1311,7 +1311,7 @@ NetLobbyServer::DoMissionData(NetPeer* peer, Text msg)
Text reply = Serialize(mission, user);
SendData(user, NET_LOBBY_MISSION_DATA, reply);
- FILE* f = ::fopen("multi_mission_send.def", "w");
+ FILE* f = ::fopen("multi_mission_send.def", "wb");
if (f) {
::fwrite(reply.data(), reply.length(), 1, f);
::fclose(f);