summaryrefslogtreecommitdiffstats
path: root/src/base/abci/abcDec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/abci/abcDec.c')
-rw-r--r--src/base/abci/abcDec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/base/abci/abcDec.c b/src/base/abci/abcDec.c
index 7e49beb1..309c6a50 100644
--- a/src/base/abci/abcDec.c
+++ b/src/base/abci/abcDec.c
@@ -402,10 +402,11 @@ Abc_TtStore_t * Abc_TtStoreLoad( char * pFileName, int nVarNum )
{
char * pBuffer;
int nFileSize = Abc_FileSize( pFileName );
- int nBytes = (1 << nVarNum);
+ int nBytes = (1 << (nVarNum-3));
int nTruths = nFileSize / nBytes;
if ( nFileSize == -1 )
return NULL;
+ assert( nVarNum >= 6 );
if ( nFileSize % nBytes != 0 )
Abc_Print( 0, "The file size (%d) is divided by the truth table size (%d) with remainder (%d).\n",
nFileSize, nBytes, nFileSize % nBytes );