From 6003e92edf10f9bc1a4e83e4343f68acc37da555 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 8 Jul 2013 19:34:20 -0700 Subject: Bug fix in 'mfs2'. --- src/opt/sfm/sfmWin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/opt/sfm/sfmWin.c b/src/opt/sfm/sfmWin.c index e39516b1..9f91c936 100644 --- a/src/opt/sfm/sfmWin.c +++ b/src/opt/sfm/sfmWin.c @@ -201,8 +201,8 @@ static inline int Sfm_NtkCheckRoot( Sfm_Ntk_t * p, int iNode, int nLevelMax ) { int i, iFanout; // the node is the root if one of the following is true: - // (1) the node has more than fanouts than the limit - if ( Sfm_ObjFanoutNum(p, iNode) > p->pPars->nFanoutMax ) + // (1) the node has more than fanouts than the limit or has no fanouts (should not happen in general) + if ( Sfm_ObjFanoutNum(p, iNode) == 0 || Sfm_ObjFanoutNum(p, iNode) > p->pPars->nFanoutMax ) return 1; // (2) the node has CO fanouts // (3) the node has fanouts above the cutoff level -- cgit v1.2.3