diff --git a/gdither.c b/gdither.c index 74f356f..4a483ae 100644 --- a/gdither.c +++ b/gdither.c @@ -342,7 +342,7 @@ void gdither_run(GDither s, unsigned int channel, unsigned int length, for (i=0; (i + pos) < length && i < GDITHER_CONV_BLOCK; i++) { conv[i] = x[pos + i]; } - gdither_runf(s, channel, i, conv, ycast + s->channels * step); + gdither_runf(s, channel, i, conv, ycast + pos * step); pos += i; } }