mirror of https://github.com/YosysHQ/abc.git
Fix memory corruption in &mfs.
This commit is contained in:
parent
64637b8395
commit
c0e252846e
|
|
@ -111,8 +111,10 @@ int Sfm_TruthToCnf( word Truth, word * pTruth, int nVars, Vec_Int_t * vCover, Ve
|
|||
int i, k, c, RetValue, Literal, Cube, nCubes = 0;
|
||||
assert( nVars > 0 );
|
||||
|
||||
Abc_TtFlipVar5( &Truth, nVars );
|
||||
Abc_TtFlipVar5( pTruth, nVars );
|
||||
if ( nVars <= 6)
|
||||
Abc_TtFlipVar5( &Truth, nVars );
|
||||
else
|
||||
Abc_TtFlipVar5( pTruth, nVars );
|
||||
for ( c = 0; c < 2; c ++ )
|
||||
{
|
||||
if ( nVars <= 6 )
|
||||
|
|
@ -148,7 +150,8 @@ int Sfm_TruthToCnf( word Truth, word * pTruth, int nVars, Vec_Int_t * vCover, Ve
|
|||
Vec_StrPush( vCnf, (char)-1 );
|
||||
}
|
||||
}
|
||||
Abc_TtFlipVar5( pTruth, nVars );
|
||||
if (nVars > 6)
|
||||
Abc_TtFlipVar5( pTruth, nVars );
|
||||
|
||||
return nCubes;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue