From e026f05ae3c436f825eb9b5f788a3c5f33e7bdad Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 28 Mar 2016 10:18:17 -0700 Subject: Bug fix in truth table reading for funcs with less than 6 vars. --- src/base/abci/abcDec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/base/abci/abcDec.c') diff --git a/src/base/abci/abcDec.c b/src/base/abci/abcDec.c index a495cefc..919a46de 100644 --- a/src/base/abci/abcDec.c +++ b/src/base/abci/abcDec.c @@ -91,7 +91,7 @@ static inline void Abc_TruthWriteHexDigit( FILE * pFile, int HexDigit ) void Abc_TruthReadHex( word * pTruth, char * pString, int nVars ) { int nWords = (nVars < 7)? 1 : (1 << (nVars-6)); - int k, Digit, nDigits = (nWords << 4); + int k, Digit, nDigits = (nVars < 7) ? (1 << (nVars-2)) : (nWords << 4); char EndSymbol; // skip the first 2 symbols if they are "0x" if ( pString[0] == '0' && pString[1] == 'x' ) -- cgit v1.2.3