mirror of https://github.com/YosysHQ/abc.git
Merge pull request #465 from zeldin/flipvar5_fix
Fix memory corruption in &mfs.
This commit is contained in:
commit
fd04a1c073
|
|
@ -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;
|
int i, k, c, RetValue, Literal, Cube, nCubes = 0;
|
||||||
assert( nVars > 0 );
|
assert( nVars > 0 );
|
||||||
|
|
||||||
Abc_TtFlipVar5( &Truth, nVars );
|
if ( nVars <= 6)
|
||||||
Abc_TtFlipVar5( pTruth, nVars );
|
Abc_TtFlipVar5( &Truth, nVars );
|
||||||
|
else
|
||||||
|
Abc_TtFlipVar5( pTruth, nVars );
|
||||||
for ( c = 0; c < 2; c ++ )
|
for ( c = 0; c < 2; c ++ )
|
||||||
{
|
{
|
||||||
if ( nVars <= 6 )
|
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 );
|
Vec_StrPush( vCnf, (char)-1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Abc_TtFlipVar5( pTruth, nVars );
|
if (nVars > 6)
|
||||||
|
Abc_TtFlipVar5( pTruth, nVars );
|
||||||
|
|
||||||
return nCubes;
|
return nCubes;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue