From 324d73c29a22766063df46f9e35a3cbe719a83c2 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sat, 27 Apr 2013 15:23:12 -0700 Subject: New fast extract. --- src/misc/vec/vecVec.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/misc/vec/vecVec.h') diff --git a/src/misc/vec/vecVec.h b/src/misc/vec/vecVec.h index d935be0f..f8f36d8b 100644 --- a/src/misc/vec/vecVec.h +++ b/src/misc/vec/vecVec.h @@ -253,6 +253,7 @@ static inline int Vec_VecCap( Vec_Vec_t * p ) ***********************************************************************/ static inline int Vec_VecLevelSize( Vec_Vec_t * p, int i ) { + assert( i >= 0 && i < p->nSize ); return Vec_PtrSize( (Vec_Ptr_t *)p->pArray[i] ); } @@ -617,7 +618,7 @@ static inline void Vec_VecPrintInt( Vec_Vec_t * p, int fSkipSingles ) int i, k, Entry; Vec_VecForEachEntryInt( p, Entry, i, k ) { - if ( Vec_VecLevelSize(p, i) == 1 ) + if ( fSkipSingles && Vec_VecLevelSize(p, i) == 1 ) break; if ( k == 0 ) printf( " %4d : {", i ); -- cgit v1.2.3