merge l_net from ZeroRadiant
git-svn-id: svn://svn.icculus.org/netradiant/trunk@409 61c419a2-8eb2-4b30-bcec-8cead039b335
This commit is contained in:
parent
0163475e2c
commit
b9b9429a0a
|
|
@ -480,7 +480,7 @@ void NMSG_WriteString(netmessage_t *msg, char *string)
|
||||||
WinPrint("NMSG_WriteString: overflow\n");
|
WinPrint("NMSG_WriteString: overflow\n");
|
||||||
return;
|
return;
|
||||||
} //end if
|
} //end if
|
||||||
strcpy(&msg->data[msg->size], string);
|
memcpy(&msg->data[msg->size], string, strlen(string) + 1);
|
||||||
msg->size += strlen(string) + 1;
|
msg->size += strlen(string) + 1;
|
||||||
} //end of the function NMSG_WriteString
|
} //end of the function NMSG_WriteString
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
@ -502,7 +502,7 @@ void NMSG_ReadStart(netmessage_t *msg)
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
int NMSG_ReadChar(netmessage_t *msg)
|
int NMSG_ReadChar(netmessage_t *msg)
|
||||||
{
|
{
|
||||||
if (msg->size + 1 > msg->size)
|
if (msg->read + 1 > msg->size)
|
||||||
{
|
{
|
||||||
msg->readoverflow = qtrue;
|
msg->readoverflow = qtrue;
|
||||||
WinPrint("NMSG_ReadChar: read overflow\n");
|
WinPrint("NMSG_ReadChar: read overflow\n");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user