From 643b7c97acd01d56381119b95f2c07b7a366b488 Mon Sep 17 00:00:00 2001 From: "Dimitrie O. Paun" Date: Thu, 11 Sep 2003 20:40:57 +0000 Subject: [PATCH] The Get[RGB]Value() macros should return a BYTE, not the same type as the one passed in. --- include/wingdi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/wingdi.h b/include/wingdi.h index db191edb3b3..611e87cc988 100644 --- a/include/wingdi.h +++ b/include/wingdi.h @@ -420,9 +420,9 @@ DECL_WINELIB_TYPE_AW(LOGCOLORSPACE) #define PALETTERGB(r,g,b) (0x02000000 | RGB(r,g,b)) #define PALETTEINDEX(i) ((COLORREF)(0x01000000 | (WORD)(i))) -#define GetRValue(rgb) ((rgb) & 0xff) -#define GetGValue(rgb) (((rgb) >> 8) & 0xff) -#define GetBValue(rgb) (((rgb) >> 16) & 0xff) +#define GetRValue(rgb) ((BYTE) (rgb) ) +#define GetGValue(rgb) ((BYTE) ((rgb) >> 8)) +#define GetBValue(rgb) ((BYTE) ((rgb) >> 16)) #define GetKValue(cmyk) ((BYTE) (cmyk) ) #define GetYValue(cmyk) ((BYTE) ((cmyk) >> 8))