summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'desktop')
-rw-r--r--desktop/plot_style.h4
1 files changed, 2 insertions, 2 deletions
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))