diff options
Diffstat (limited to 'games/openttd/patches/patch-af')
-rw-r--r-- | games/openttd/patches/patch-af | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/games/openttd/patches/patch-af b/games/openttd/patches/patch-af new file mode 100644 index 00000000000..5722ca98192 --- /dev/null +++ b/games/openttd/patches/patch-af @@ -0,0 +1,45 @@ +$NetBSD: patch-af,v 1.1 2005/09/11 11:44:29 adrianp Exp $ + +--- network_server.c.orig 2005-05-17 19:22:59.000000000 +0100 ++++ network_server.c +@@ -159,7 +159,7 @@ DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SER + + DEBUG(net, 2)("[NET] %s made an error (%s) and his connection is closed", client_name, str); + +- NetworkTextMessage(NETWORK_ACTION_LEAVE, 1, false, client_name, str); ++ NetworkTextMessage(NETWORK_ACTION_LEAVE, 1, false, client_name, "%s", str); + + FOR_ALL_CLIENTS(new_cs) { + if (new_cs->status > STATUS_AUTH && new_cs != cs) { +@@ -907,7 +907,7 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT + + DEBUG(net, 2)("[NET] %s reported an error and is closing his connection (%s)", client_name, str); + +- NetworkTextMessage(NETWORK_ACTION_LEAVE, 1, false, client_name, str); ++ NetworkTextMessage(NETWORK_ACTION_LEAVE, 1, false, client_name, "%s", str); + + FOR_ALL_CLIENTS(new_cs) { + if (new_cs->status > STATUS_AUTH) { +@@ -932,11 +932,11 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT + return; + } + +- NetworkRecv_string(cs, p, str, 100); ++ NetworkRecv_string(cs, p, str, lengthof(str)); + + NetworkGetClientName(client_name, sizeof(client_name), cs); + +- NetworkTextMessage(NETWORK_ACTION_LEAVE, 1, false, client_name, str); ++ NetworkTextMessage(NETWORK_ACTION_LEAVE, 1, false, client_name, "%s", str); + + FOR_ALL_CLIENTS(new_cs) { + if (new_cs->status > STATUS_AUTH) { +@@ -1111,7 +1111,7 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT + if (ci != NULL) { + // Display change + if (NetworkFindName(client_name)) { +- NetworkTextMessage(NETWORK_ACTION_NAME_CHANGE, 1, false, ci->client_name, client_name); ++ NetworkTextMessage(NETWORK_ACTION_NAME_CHANGE, 1, false, ci->client_name, "%s", client_name); + ttd_strlcpy(ci->client_name, client_name, sizeof(ci->client_name)); + NetworkUpdateClientInfo(ci->client_index); + } |