diff --git a/src/raster/palette.cpp b/src/raster/palette.cpp index 4716f949c..e402eb8a0 100644 --- a/src/raster/palette.cpp +++ b/src/raster/palette.cpp @@ -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;