summaryrefslogtreecommitdiffstats
path: root/src/map/if/ifTruth.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2008-03-14 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2008-03-14 08:01:00 -0700
commitff6f0943362c30176fd1f961bcbd19e188cee520 (patch)
treefc2b888c8403ee04fb7d473433c1eb3bcc5ef8c5 /src/map/if/ifTruth.c
parent6205eaaee3a840dd076f9baaac67720d85d6a680 (diff)
downloadabc-ff6f0943362c30176fd1f961bcbd19e188cee520.tar.gz
abc-ff6f0943362c30176fd1f961bcbd19e188cee520.tar.bz2
abc-ff6f0943362c30176fd1f961bcbd19e188cee520.zip
Version abc80314
Diffstat (limited to 'src/map/if/ifTruth.c')
-rw-r--r--src/map/if/ifTruth.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/if/ifTruth.c b/src/map/if/ifTruth.c
index a3a7e1ee..637a42b4 100644
--- a/src/map/if/ifTruth.c
+++ b/src/map/if/ifTruth.c
@@ -146,16 +146,18 @@ void If_CutTruthPermute( unsigned * pOut, unsigned * pIn, int nVars, float * pDe
for ( i = 0; i < nVars - 1; i++ )
{
if ( pDelays[i] >= pDelays[i+1] )
+// if ( pDelays[i] <= pDelays[i+1] )
continue;
tTemp = pDelays[i]; pDelays[i] = pDelays[i+1]; pDelays[i+1] = tTemp;
Temp = pVars[i]; pVars[i] = pVars[i+1]; pVars[i+1] = Temp;
+ if ( pOut && pIn )
If_TruthSwapAdjacentVars( pOut, pIn, nVars, i );
pTemp = pOut; pOut = pIn; pIn = pTemp;
fChange = 1;
Counter++;
}
}
- if ( Counter & 1 )
+ if ( pOut && pIn && (Counter & 1) )
If_TruthCopy( pOut, pIn, nVars );
}