diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-07-13 16:10:20 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-07-13 16:10:20 -0700 |
commit | b7b60ebdcbd2ec1bca70accfa6abb524e4f77760 (patch) | |
tree | 56e4b6be5d16f7c820d3320b2489427e652d049b /src/misc/vec | |
parent | be95437d1a416deaab1bee7a63c526376243c431 (diff) | |
download | abc-b7b60ebdcbd2ec1bca70accfa6abb524e4f77760.tar.gz abc-b7b60ebdcbd2ec1bca70accfa6abb524e4f77760.tar.bz2 abc-b7b60ebdcbd2ec1bca70accfa6abb524e4f77760.zip |
Fixing a mismatch in regular/shadow page memory appending procedure.
Diffstat (limited to 'src/misc/vec')
-rw-r--r-- | src/misc/vec/vecSet.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/misc/vec/vecSet.h b/src/misc/vec/vecSet.h index 8b031e1e..0297eeb3 100644 --- a/src/misc/vec/vecSet.h +++ b/src/misc/vec/vecSet.h @@ -237,8 +237,8 @@ static inline int Vec_SetAppend( Vec_Set_t * p, int * pArray, int nSize ) static inline int Vec_SetAppendS( Vec_Set_t * p, int nSize ) { int nWords = Vec_SetWordNum( nSize ); - assert( nWords < (1 << p->nPageSize) ); - if ( Vec_SetLimitS( p->pPages[p->iPageS] ) + nWords > (1 << p->nPageSize) ) + assert( nWords + 3 < (1 << p->nPageSize) ); + if ( Vec_SetLimitS( p->pPages[p->iPageS] ) + nWords >= (1 << p->nPageSize) ) Vec_SetWriteLimitS( p->pPages[++p->iPageS], 2 ); Vec_SetIncLimitS( p->pPages[p->iPageS], nWords ); return Vec_SetHandCurrentS(p) - nWords; |