summaryrefslogtreecommitdiffstats
path: root/src/misc/vec
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2006-12-16 08:01:00 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2006-12-16 08:01:00 -0800
commitbe6a484a997a8477d4c3b03c17f798c1b0061bf1 (patch)
tree5c2e6dfa747144ba11dbdc8298ad08b19d5e49d1 /src/misc/vec
parentae037e45038cca6f0b86abea50692399a03b01be (diff)
downloadabc-be6a484a997a8477d4c3b03c17f798c1b0061bf1.tar.gz
abc-be6a484a997a8477d4c3b03c17f798c1b0061bf1.tar.bz2
abc-be6a484a997a8477d4c3b03c17f798c1b0061bf1.zip
Version abc61216
Diffstat (limited to 'src/misc/vec')
-rw-r--r--src/misc/vec/vecPtr.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/misc/vec/vecPtr.h b/src/misc/vec/vecPtr.h
index 38513a93..3b8662ec 100644
--- a/src/misc/vec/vecPtr.h
+++ b/src/misc/vec/vecPtr.h
@@ -388,10 +388,11 @@ static inline void Vec_PtrFillExtra( Vec_Ptr_t * p, int nSize, void * Entry )
int i;
if ( p->nSize >= nSize )
return;
- if ( p->nSize < 2 * nSize )
+ assert( p->nSize < nSize );
+ if ( 2 * p->nSize > nSize )
Vec_PtrGrow( p, 2 * nSize );
else
- Vec_PtrGrow( p, p->nSize );
+ Vec_PtrGrow( p, nSize );
for ( i = p->nSize; i < nSize; i++ )
p->pArray[i] = Entry;
p->nSize = nSize;