From: divverent Date: Mon, 4 Jan 2010 10:39:05 +0000 (+0000) Subject: merge l_net from ZeroRadiant X-Git-Tag: svn-r421~11 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b9b9429a0af5ac07140c7b7f53dd1d535006c44f;p=xonotic%2Fnetradiant.git merge l_net from ZeroRadiant git-svn-id: svn://svn.icculus.org/netradiant/trunk@409 61c419a2-8eb2-4b30-bcec-8cead039b335 --- diff --git a/libs/l_net/l_net.c b/libs/l_net/l_net.c index 558ec211..878e6a47 100644 --- a/libs/l_net/l_net.c +++ b/libs/l_net/l_net.c @@ -480,7 +480,7 @@ void NMSG_WriteString(netmessage_t *msg, char *string) WinPrint("NMSG_WriteString: overflow\n"); return; } //end if - strcpy(&msg->data[msg->size], string); + memcpy(&msg->data[msg->size], string, strlen(string) + 1); msg->size += strlen(string) + 1; } //end of the function NMSG_WriteString //=========================================================================== @@ -502,7 +502,7 @@ void NMSG_ReadStart(netmessage_t *msg) //=========================================================================== int NMSG_ReadChar(netmessage_t *msg) { - if (msg->size + 1 > msg->size) + if (msg->read + 1 > msg->size) { msg->readoverflow = qtrue; WinPrint("NMSG_ReadChar: read overflow\n");