From 6b01940194f84a7dc042e9561024a357702c88f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 17 Oct 2016 18:34:07 +0200 Subject: [PATCH] colorscale: Avoid invalid write --- gtk/gtkcolorscale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkcolorscale.c b/gtk/gtkcolorscale.c index 78154551f1..e1bf973f61 100644 --- a/gtk/gtkcolorscale.c +++ b/gtk/gtkcolorscale.c @@ -106,7 +106,7 @@ gtk_color_scale_draw_trough (GtkColorScale *scale, red = CLAMP (r * 255, 0, 255); green = CLAMP (g * 255, 0, 255); blue = CLAMP (b * 255, 0, 255); - p[x] = (red << 16) | (green << 8) | blue; + p[hue_x] = (red << 16) | (green << 8) | blue; } }