X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=utils%2Ffade.c;h=8d4866907aa8d4ee10380677059405ea673cb9aa;hb=258170f6204e23da06f272ffda1f4504b6ae2eaf;hp=2fbb2e97fa4f872609c6413ff5ca243977c57982;hpb=0a1527cc01e9894017614b7c36b838b2b6914ba9;p=xscreensaver diff --git a/utils/fade.c b/utils/fade.c index 2fbb2e97..8d486690 100644 --- a/utils/fade.c +++ b/utils/fade.c @@ -96,9 +96,9 @@ fade_colormap (dpy, cmap, cmap2, seconds, ticks, out_p) int j; for (j = 0; j < ncolors; j++) { - current_colors[j].red = orig_colors[j].red * i / steps; - current_colors[j].green = orig_colors[j].green * i / steps; - current_colors[j].blue = orig_colors[j].blue * i / steps; + current_colors[j].red = (int)orig_colors[j].red * i / steps; + current_colors[j].green = (int)orig_colors[j].green * i / steps; + current_colors[j].blue = (int)orig_colors[j].blue * i / steps; } XStoreColors (dpy, cmap2, current_colors, ncolors); XSync (dpy, False);