diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2022-01-21 11:33:53 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2022-01-21 11:33:53 -0800 |
commit | 5b8fa41ba966271f97f99860b21eee83bf51e61a (patch) | |
tree | a1cdff81fb35c7fb36fd856b42d4cdb47c4adcad /src/aig | |
parent | d892e63256063ba04f20ca347121116bc67a30e2 (diff) | |
download | abc-5b8fa41ba966271f97f99860b21eee83bf51e61a.tar.gz abc-5b8fa41ba966271f97f99860b21eee83bf51e61a.tar.bz2 abc-5b8fa41ba966271f97f99860b21eee83bf51e61a.zip |
Suggested bug fixes in the old code.
Diffstat (limited to 'src/aig')
-rw-r--r-- | src/aig/aig/aigUtil.c | 2 | ||||
-rw-r--r-- | src/aig/gia/giaCex.c | 2 | ||||
-rw-r--r-- | src/aig/ioa/ioaReadAig.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/aig/aig/aigUtil.c b/src/aig/aig/aigUtil.c index 52f9a184..68be112f 100644 --- a/src/aig/aig/aigUtil.c +++ b/src/aig/aig/aigUtil.c @@ -1333,7 +1333,7 @@ void Aig_ManCounterExampleValueStart( Aig_Man_t * pAig, Abc_Cex_t * pCex ) pAig->pData2 = ABC_CALLOC( unsigned, Abc_BitWordNum( (pCex->iFrame + 1) * Aig_ManObjNumMax(pAig) ) ); // the register values in the counter-example should be zero Saig_ManForEachLo( pAig, pObj, k ) - assert( Abc_InfoHasBit(pCex->pData, iBit++) == 0 ); + assert( Abc_InfoHasBit(pCex->pData, iBit) == 0 ), iBit++; // iterate through the timeframes nObjs = Aig_ManObjNumMax(pAig); for ( i = 0; i <= pCex->iFrame; i++ ) diff --git a/src/aig/gia/giaCex.c b/src/aig/gia/giaCex.c index b0e72284..d1241873 100644 --- a/src/aig/gia/giaCex.c +++ b/src/aig/gia/giaCex.c @@ -195,7 +195,7 @@ void Gia_ManCounterExampleValueStart( Gia_Man_t * pGia, Abc_Cex_t * pCex ) pGia->pData2 = ABC_CALLOC( unsigned, Abc_BitWordNum( (pCex->iFrame + 1) * Gia_ManObjNum(pGia) ) ); // the register values in the counter-example should be zero Gia_ManForEachRo( pGia, pObj, k ) - assert( Abc_InfoHasBit(pCex->pData, iBit++) == 0 ); + assert( Abc_InfoHasBit(pCex->pData, iBit) == 0 ), iBit++; // iterate through the timeframes nObjs = Gia_ManObjNum(pGia); for ( i = 0; i <= pCex->iFrame; i++ ) diff --git a/src/aig/ioa/ioaReadAig.c b/src/aig/ioa/ioaReadAig.c index 1d1dcbe2..c1eceef0 100644 --- a/src/aig/ioa/ioaReadAig.c +++ b/src/aig/ioa/ioaReadAig.c @@ -438,7 +438,7 @@ Aig_Man_t * Ioa_ReadAiger( char * pFileName, int fCheck ) // read the file into the buffer nFileSize = Ioa_FileSize( pFileName ); pFile = fopen( pFileName, "rb" ); - pContents = ABC_ALLOC( char, nFileSize ); + pContents = ABC_CALLOC( char, nFileSize+1 ); RetValue = fread( pContents, nFileSize, 1, pFile ); fclose( pFile ); |