From a31c7f6abe972870ba5753513adcf2f58b6c561a Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 16 Apr 2005 21:30:13 +0000 Subject: [PATCH] fixed a stupid bug in Entityframe5_ExpandEdicts git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5186 d7cf8633-e32d-0410-b094-e92efae38249 --- protocol.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/protocol.c b/protocol.c index 702dbbd6..20e5d631 100644 --- a/protocol.c +++ b/protocol.c @@ -1409,11 +1409,11 @@ void EntityFrame5_ExpandEdicts(entityframe5_database_t *d, int newmax) d->visiblebits = (void *)data;data += (d->maxedicts+7)/8 * sizeof(qbyte); if (oldmaxedicts) { - memcpy(d->deltabits, olddeltabits, d->maxedicts * sizeof(int)); - memcpy(d->priorities, oldpriorities, d->maxedicts * sizeof(qbyte)); - memcpy(d->updateframenum, oldupdateframenum, d->maxedicts * sizeof(int)); - memcpy(d->states, oldstates, d->maxedicts * sizeof(entity_state_t)); - memcpy(d->visiblebits, oldvisiblebits, (d->maxedicts+7)/8 * sizeof(qbyte)); + memcpy(d->deltabits, olddeltabits, oldmaxedicts * sizeof(int)); + memcpy(d->priorities, oldpriorities, oldmaxedicts * sizeof(qbyte)); + memcpy(d->updateframenum, oldupdateframenum, oldmaxedicts * sizeof(int)); + memcpy(d->states, oldstates, oldmaxedicts * sizeof(entity_state_t)); + memcpy(d->visiblebits, oldvisiblebits, (oldmaxedicts+7)/8 * sizeof(qbyte)); // the previous buffers were a single allocation, so just one free Mem_Free(olddeltabits); } -- 2.39.2