cmd.c (Cbuf_Execute), net_dgrm.c (Datagram_GetMessage), net_loop.c (Loop_GetMessage):

replaced memcpy calls for overlapping areas with memmove().


git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@66 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2010-02-19 23:55:17 +00:00
parent 11614c482b
commit 2afebd8dc1
3 changed files with 3 additions and 3 deletions

View file

@ -181,7 +181,7 @@ void Cbuf_Execute (void)
{
i++;
cmd_text.cursize -= i;
Q_memcpy (text, text+i, cmd_text.cursize);
memmove (text, text + i, cmd_text.cursize);
}
// execute the command line

View file

@ -413,7 +413,7 @@ int Datagram_GetMessage (qsocket_t *sock)
sock->sendMessageLength -= MAX_DATAGRAM;
if (sock->sendMessageLength > 0)
{
Q_memcpy(sock->sendMessage, sock->sendMessage+MAX_DATAGRAM, sock->sendMessageLength);
memmove(sock->sendMessage, sock->sendMessage + MAX_DATAGRAM, sock->sendMessageLength);
sock->sendNext = true;
}
else

View file

@ -143,7 +143,7 @@ int Loop_GetMessage (qsocket_t *sock)
sock->receiveMessageLength -= length;
if (sock->receiveMessageLength)
Q_memcpy(sock->receiveMessage, &sock->receiveMessage[length], sock->receiveMessageLength);
memmove(sock->receiveMessage, &sock->receiveMessage[length], sock->receiveMessageLength);
if (sock->driverdata && ret == 1)
((qsocket_t *)sock->driverdata)->canSend = true;