diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2011-11-08 11:36:35 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2011-11-08 11:36:35 -0800 |
commit | 55e9c4d0faebbaae551618e95a77f60b9648a257 (patch) | |
tree | 54f8b3cbddf8aceb72bae10275c1de32372333d4 /src/base | |
parent | 9a89e3f9f5ead585370edc62e037d38dd3d3ff8f (diff) | |
download | abc-55e9c4d0faebbaae551618e95a77f60b9648a257.tar.gz abc-55e9c4d0faebbaae551618e95a77f60b9648a257.tar.bz2 abc-55e9c4d0faebbaae551618e95a77f60b9648a257.zip |
Corner case bug in deriving truth table from SOP.
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/abc/abcSop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/base/abc/abcSop.c b/src/base/abc/abcSop.c index 2b66fc77..297b0737 100644 --- a/src/base/abc/abcSop.c +++ b/src/base/abc/abcSop.c @@ -954,7 +954,7 @@ char * Abc_SopFromTruthHex( char * pTruth ) // get the number of variables nTruthSize = strlen(pTruth); - nVars = Extra_Base2Log( nTruthSize ) + 2; + nVars = (nTruthSize < 2) ? 2 : Extra_Base2Log(nTruthSize) + 2; if ( nTruthSize != (1 << (nVars-2)) ) { printf( "String %s does not look like a truth table of a %d-variable function.\n", pTruth, nVars ); |