summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2008-09-27 15:21:10 +0000
committerAndrey Nazarov <skuller@skuller.net>2008-09-27 15:21:10 +0000
commitbefa1e91050929a6211a88c7a924372fc6bacd0c (patch)
tree452cf2950b77e085f4117ab3a6fe6be1857f1ea4 /source
parent4286646fd3ca3412bc261b66ecd0e7cbe121636a (diff)
Avoid overlapped memcpy when MSG_ParseDeltaEntity is called from MVD code.
Diffstat (limited to 'source')
-rw-r--r--source/q_msg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/q_msg.c b/source/q_msg.c
index 50e237e..96f8f76 100644
--- a/source/q_msg.c
+++ b/source/q_msg.c
@@ -1892,7 +1892,9 @@ void MSG_ParseDeltaEntity( const entity_state_t *from,
// set everything to the state we are delta'ing from
if( from ) {
- memcpy( to, from, sizeof( *to ) );
+ if( to != from ) {
+ memcpy( to, from, sizeof( *to ) );
+ }
VectorCopy( from->origin, to->old_origin );
} else {
memset( to, 0, sizeof( *to ) );