summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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