X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fimsmap.c;h=cb88c10a6cc6ea8bc0420b1418c81dd4d742f885;hb=14463b6ad1ab1ccf81f9c33350b048e410ba94cb;hp=f89f95fede33925458a1d8262c4fbab7171f33bb;hpb=c596d1306f5f92f7eab76224d3b049980a14adcb;p=xscreensaver diff --git a/hacks/imsmap.c b/hacks/imsmap.c index f89f95fe..cb88c10a 100644 --- a/hacks/imsmap.c +++ b/hacks/imsmap.c @@ -77,6 +77,7 @@ init_map (Display *dpy, Window window) if (ncolors <= 2) ncolors = 0; if (ncolors == 0) mono_p = True; + if (ncolors > 255) ncolors = 255; /* too many look bad */ fg_pixel = get_pixel_resource ("background", "Background", dpy, cmap); bg_pixel = get_pixel_resource ("foreground", "Foreground", dpy, cmap);