Fix Palette:countDiff() bug when "to" must be equal to max-1.

This commit is contained in:
David Capello 2011-01-05 20:11:58 -03:00
parent 6a216ad6a8
commit bc753c5bc1

View File

@ -122,7 +122,7 @@ int Palette::countDiff(const Palette* other, int* from, int* to) const
if (max != min) {
diff += max - min;
if (to) *to = max;
if (to) *to = max-1;
}
return diff;