@@ -625,13 +625,13 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER
break;
case NETWORK_ACTION_CHAT_COMPANY:
case NETWORK_ACTION_GIVE_MONEY:
/* For speaking to player or give money, we need the player-name */
if (!IsValidPlayer(ci_to->client_playas)) return NETWORK_RECV_STATUS_OKAY; // This should never happen
GetString(name, GetPlayer(ci_to->client_playas)->name_1);
GetString(name, GetPlayer(ci_to->client_playas)->name_1, lastof(name));
ci = NetworkFindClientInfoFromIndex(_network_own_client_index);
default:
/* This should never happen */
NOT_REACHED();
@@ -651,13 +651,13 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER
{
char str[100];
uint16 index;
NetworkClientInfo *ci;
index = NetworkRecv_uint16(MY_CLIENT, p);
GetNetworkErrorMsg(str, NetworkRecv_uint8(MY_CLIENT, p));
GetNetworkErrorMsg(str, NetworkRecv_uint8(MY_CLIENT, p), lastof(str));
ci = NetworkFindClientInfoFromIndex(index);
if (ci != NULL) {
NetworkTextMessage(NETWORK_ACTION_LEAVE, 1, false, ci->client_name, "%s", str);
// The client is gone, give the NetworkClientInfo free