Fix bug so that we at least generate *some* endpoints

This commit is contained in:
Pavel Krajcevski 2014-03-28 11:40:38 -04:00
parent 2141d71dd0
commit fabf6830ee

View file

@ -306,7 +306,8 @@ double RGBACluster::QuantizedError(
float minError = FLT_MAX;
uint8 bestBucket = 0;
for(int32 j = j1; j <= j2; j++) {
int32 j = j1;
do {
uint32 interp0 = (*interpVals)[j][0];
uint32 interp1 = (*interpVals)[j][1];
@ -331,7 +332,7 @@ double RGBACluster::QuantizedError(
else if(error > minError) {
break;
}
}
} while(++j <= j2);
totalError += minError;