]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
changed two memcpy calls to memmove after testing in valgrind (no other
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 13 Nov 2007 01:59:09 +0000 (01:59 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 13 Nov 2007 01:59:09 +0000 (01:59 +0000)
errors found, and these are in original Quake code)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7693 d7cf8633-e32d-0410-b094-e92efae38249

cmd.c
netconn.c

diff --git a/cmd.c b/cmd.c
index e9e3a971ae6c42129c0c652b9596d0544d2c5e89..e8a275f545ee301d03aed0b7980a40b0c39d9a95 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -181,7 +181,7 @@ void Cbuf_Execute (void)
                {
                        i++;
                        cmd_text.cursize -= i;
-                       memcpy (cmd_text.data, text+i, cmd_text.cursize);
+                       memmove (cmd_text.data, text+i, cmd_text.cursize);
                }
 
 // execute the command line
index ca412f538ac0f481a3b61736962f0a66426176fd..9ef5455065994d6af59dbccaa307afa8347e1a84 100755 (executable)
--- a/netconn.c
+++ b/netconn.c
@@ -1091,7 +1091,7 @@ static int NetConn_ReceivedMessage(netconn_t *conn, unsigned char *data, int len
                                                        unsigned int *header;
 
                                                        conn->sendMessageLength -= MAX_PACKETFRAGMENT;
-                                                       memcpy(conn->sendMessage, conn->sendMessage+MAX_PACKETFRAGMENT, conn->sendMessageLength);
+                                                       memmove(conn->sendMessage, conn->sendMessage+MAX_PACKETFRAGMENT, conn->sendMessageLength);
 
                                                        if (conn->sendMessageLength <= MAX_PACKETFRAGMENT)
                                                        {