diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2016-03-28 10:18:17 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2016-03-28 10:18:17 -0700 |
commit | e026f05ae3c436f825eb9b5f788a3c5f33e7bdad (patch) | |
tree | fc4b473bfab7613bf8f2b6afdd5280baff45b5ff /src/bool/lucky/luckyRead.c | |
parent | 81b70c4d20ebe798a5440653ebd40e26bbe99f72 (diff) | |
download | abc-e026f05ae3c436f825eb9b5f788a3c5f33e7bdad.tar.gz abc-e026f05ae3c436f825eb9b5f788a3c5f33e7bdad.tar.bz2 abc-e026f05ae3c436f825eb9b5f788a3c5f33e7bdad.zip |
Bug fix in truth table reading for funcs with less than 6 vars.
Diffstat (limited to 'src/bool/lucky/luckyRead.c')
-rw-r--r-- | src/bool/lucky/luckyRead.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bool/lucky/luckyRead.c b/src/bool/lucky/luckyRead.c index cf8e57d4..10c58170 100644 --- a/src/bool/lucky/luckyRead.c +++ b/src/bool/lucky/luckyRead.c @@ -56,7 +56,7 @@ static inline void Abc_TruthWriteHexDigit( FILE * pFile, int HexDigit ) static inline 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' ) |