summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-07-08 19:34:20 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2013-07-08 19:34:20 -0700
commit6003e92edf10f9bc1a4e83e4343f68acc37da555 (patch)
tree73d5aefb31433fc6c317ae420353b6b7f167f31f
parent9dfd8be57774e55b1d626fe48407199455379e1e (diff)
downloadabc-6003e92edf10f9bc1a4e83e4343f68acc37da555.tar.gz
abc-6003e92edf10f9bc1a4e83e4343f68acc37da555.tar.bz2
abc-6003e92edf10f9bc1a4e83e4343f68acc37da555.zip
Bug fix in 'mfs2'.
-rw-r--r--src/opt/sfm/sfmWin.c4
1 files changed, 2 insertions, 2 deletions
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