--- a/network_client.c Thu Dec 23 13:03:48 2004 +0000
+++ b/network_client.c Thu Dec 23 13:53:05 2004 +0000
@@ -619,6 +619,8 @@
case NETWORK_ACTION_CHAT_PLAYER:
case NETWORK_ACTION_GIVE_MONEY:
/* For speak to player or give money, we need the player-name */
+ if (ci_to->client_playas > MAX_PLAYERS)
+ return NETWORK_RECV_STATUS_OKAY; // This should never happen
GetString(name, DEREF_PLAYER(ci_to->client_playas-1)->name_1);
ci = NetworkFindClientInfoFromIndex(_network_own_client_index);
break;
--- a/network_server.c Thu Dec 23 13:03:48 2004 +0000
+++ b/network_server.c Thu Dec 23 13:53:05 2004 +0000
@@ -995,7 +995,7 @@
} else {
FOR_ALL_CLIENTS(cs) {
if (cs->index == from_index) {
- SEND_COMMAND(PACKET_SERVER_CHAT)(cs, action, dest, true, msg);
+ SEND_COMMAND(PACKET_SERVER_CHAT)(cs, action, ci_to->client_index, true, msg);
}
}
}