diff --git a/wrlib/gradient.c b/wrlib/gradient.c index 2232f2f4..4540384e 100644 --- a/wrlib/gradient.c +++ b/wrlib/gradient.c @@ -478,8 +478,8 @@ renderMDGradient(unsigned width, unsigned height, RColor **colors, int count) width = width * 3; /* copy the first line to the other lines with corresponding offset */ - for (offset=0; jdata[0]), &ptr[3*(int)offset], width); + for (j=0, offset=0; jdata[j]), &ptr[3*(int)offset], width); offset += a; } RDestroyImage(tmp);