mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 15:31:39 +00:00
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:
parent
11614c482b
commit
2afebd8dc1
3 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue