From 6a32252403781b303d4ebd195932ce39c5b1c08e Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 30 Jul 2019 16:03:58 +0200 Subject: Update to 5.43 --- utils/colors.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'utils/colors.c') 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 } -- cgit v1.2.3-55-g7522