From 5bebf2f2fc27a31c8b2efa7a837baef63c1b0a97 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 7 Jul 2010 18:08:17 +0000 Subject: Merge branches/vince/netsurf-fbtk-rework to trunk. svn path=/trunk/netsurf/; revision=10605 --- desktop/plot_style.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'desktop/plot_style.h') diff --git a/desktop/plot_style.h b/desktop/plot_style.h index a3b3f0103..1271e138b 100644 --- a/desktop/plot_style.h +++ b/desktop/plot_style.h @@ -31,13 +31,13 @@ /* Darken a colour by taking three quarters of each channel's intensity */ #define darken_colour(c1) \ - ((((3 * (c1 >> 16)) >> 2) << 16) | \ + ((((3 * ((c1 >> 16) & 0xff)) >> 2) << 16) | \ (((3 * ((c1 >> 8) & 0xff)) >> 2) << 8) | \ (((3 * (c1 & 0xff)) >> 2) << 0)) /* Darken a colour by taking nine sixteenths of each channel's intensity */ #define double_darken_colour(c1) \ - ((((9 * (c1 >> 16)) >> 4) << 16) | \ + ((((9 * ((c1 >> 16) & 0xff)) >> 4) << 16) | \ (((9 * ((c1 >> 8) & 0xff)) >> 4) << 8) | \ (((9 * (c1 & 0xff)) >> 4) << 0)) -- cgit v1.2.3