(svn r4267) - Fix (r4241): also validate the error number that a client receives from a server, and encapsulate this functionality into GetNetworkErrorMsg().

This commit is contained in:
Darkvater
2006-04-03 18:31:01 +00:00
parent 12cfa5526b
commit 6c3c1c22d3
4 changed files with 36 additions and 30 deletions

View File

@@ -676,15 +676,12 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_CHAT)
DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_ERROR_QUIT)
{
int errorno;
char str[100];
uint16 index;
NetworkClientInfo *ci;
index = NetworkRecv_uint16(MY_CLIENT, p);
errorno = NetworkRecv_uint8(MY_CLIENT, p);
GetString(str, STR_NETWORK_ERR_CLIENT_GENERAL + errorno);
GetNetworkErrorMsg(str, NetworkRecv_uint8(MY_CLIENT, p));
ci = NetworkFindClientInfoFromIndex(index);
if (ci != NULL) {