summaryrefslogtreecommitdiffstats
path: root/src/base/abc/abcSop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/abc/abcSop.c')
-rw-r--r--src/base/abc/abcSop.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/base/abc/abcSop.c b/src/base/abc/abcSop.c
index 4e9a6548..0836bb89 100644
--- a/src/base/abc/abcSop.c
+++ b/src/base/abc/abcSop.c
@@ -840,6 +840,12 @@ char * Abc_SopFromTruthBin( char * pTruth )
if ( Digit == 1 )
Vec_IntPush( vMints, nTruthSize - 1 - i );
}
+ if ( Vec_IntSize( vMints ) == 0 || Vec_IntSize( vMints ) == nTruthSize )
+ {
+ Vec_IntFree( vMints );
+ printf( "Cannot create constant function.\n" );
+ return NULL;
+ }
// create the SOP representation of the minterms
Length = Vec_IntSize(vMints) * (nVars + 3);