summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-04-28 12:56:32 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2014-04-28 12:56:32 -0700
commitfd1ed5b23246142fa2b8ee41f25f332439dd3656 (patch)
tree5216605ff5dac3b493a77c3ed74ae3cb9e75a811 /src
parent6095b1517488139c4d6b94507bc230cf4588ffd3 (diff)
downloadabc-fd1ed5b23246142fa2b8ee41f25f332439dd3656.tar.gz
abc-fd1ed5b23246142fa2b8ee41f25f332439dd3656.tar.bz2
abc-fd1ed5b23246142fa2b8ee41f25f332439dd3656.zip
Added dumping original object names into a file.
Diffstat (limited to 'src')
-rw-r--r--src/base/abc/abcNames.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/base/abc/abcNames.c b/src/base/abc/abcNames.c
index 87ae3717..d6558da4 100644
--- a/src/base/abc/abcNames.c
+++ b/src/base/abc/abcNames.c
@@ -569,7 +569,7 @@ void Abc_NtkTransferNameIds( Abc_Ntk_t * p, Abc_Ntk_t * pNew )
// printf( "%d ", Vec_IntEntry(p->vNameIds, Abc_ObjId(pObj)) );
// printf( "\n" );
Abc_NtkForEachObj( p, pObj, i )
- if ( pObj->pCopy && Vec_IntEntry(p->vNameIds, i) )
+ if ( pObj->pCopy && i < Vec_IntSize(p->vNameIds) && Vec_IntEntry(p->vNameIds, i) )
{
pObjNew = Abc_ObjRegular(pObj->pCopy);
assert( Abc_ObjNtk(pObjNew) == pNew );
@@ -614,7 +614,7 @@ void Abc_NtkUpdateNameIds( Abc_Ntk_t * p )
// add info about names
Abc_NtkForEachObj( p, pObj, i )
{
- if ( !Vec_IntEntry(p->vNameIds, i) )
+ if ( i == 0 || i >= Vec_IntSize(p->vNameIds) || !Vec_IntEntry(p->vNameIds, i) )
continue;
iVar = Abc_Lit2Var( Vec_IntEntry(p->vNameIds, i) );
fCompl = Abc_LitIsCompl( Vec_IntEntry(p->vNameIds, i) );