Bug fix in 'addbuffs'.

This commit is contained in:
Alan Mishchenko 2012-03-29 15:48:45 -07:00
parent 38494b41a6
commit 9eb1be8e53
1 changed files with 2 additions and 2 deletions

View File

@ -2038,10 +2038,10 @@ Abc_Ntk_t * Abc_NtkAddBuffs( Abc_Ntk_t * pNtkInit, int fVerbose )
int i, k, nLevelMax = Abc_NtkLevel( pNtk );
Abc_NtkForEachCo( pNtk, pObj, i )
pObj->Level = nLevelMax + 1;
vBuffs = Vec_PtrStart( Abc_NtkObjNumMax(pNtk) * nLevelMax );
vBuffs = Vec_PtrStart( Abc_NtkObjNumMax(pNtk) * (nLevelMax + 1) );
Abc_NtkForEachObj( pNtk, pObj, i )
{
if ( i == Vec_PtrSize(vBuffs) / nLevelMax )
if ( i == Vec_PtrSize(vBuffs) / (nLevelMax + 1) )
break;
if ( !Abc_ObjIsNode(pObj) && !Abc_ObjIsCo(pObj) )
continue;