network_client.c
changeset 779 1abefd084ffb
parent 774 258c11431acb
child 841 8f0a68c6f43b
--- 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;