diff --git a/include/wingdi.h b/include/wingdi.h index 71abf76a0db..bff2f136cee 100644 --- a/include/wingdi.h +++ b/include/wingdi.h @@ -416,7 +416,7 @@ DECL_WINELIB_TYPE_AW(LOGCOLORSPACE) /* Colors */ -#define RGB(r,g,b) ((COLORREF)((r) | ((g) << 8) | ((b) << 16))) +#define RGB(r,g,b) ((COLORREF)((BYTE)(r) | ((BYTE)(g) << 8) | ((BYTE)(b) << 16))) #define PALETTERGB(r,g,b) (0x02000000 | RGB(r,g,b)) #define PALETTEINDEX(i) ((COLORREF)(0x01000000 | (WORD)(i)))