$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); }