diff options
author | Simon Rettberg | 2019-07-30 16:03:58 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-07-30 16:03:58 +0200 |
commit | 6a32252403781b303d4ebd195932ce39c5b1c08e (patch) | |
tree | cd2f8b3c4052c1b575caf33c9983ae531fad9092 /utils/colors.c | |
parent | Remove android and OSX files (diff) | |
download | xscreensaver-6a32252403781b303d4ebd195932ce39c5b1c08e.tar.gz xscreensaver-6a32252403781b303d4ebd195932ce39c5b1c08e.tar.xz xscreensaver-6a32252403781b303d4ebd195932ce39c5b1c08e.zip |
Update to 5.43
Diffstat (limited to 'utils/colors.c')
-rw-r--r-- | utils/colors.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/colors.c b/utils/colors.c index 5445cd6..01f8fc6 100644 --- a/utils/colors.c +++ b/utils/colors.c @@ -393,11 +393,13 @@ make_color_path (Screen *screen, Visual *visual, Colormap cmap, if (k <= 0) return; # else - for (i = k+1; i < *ncolorsP; i++) + if (k <= 0) + return; + for (i = k; i < *ncolorsP; i++) /* #### Should duplicate the allocation of the color cell here to avoid a double-color-free on PseudoColor, but it's 2018 and I don't care, */ - colors[i] = colors[k]; + colors[i] = colors[i-1]; # endif } |