From a9de59c906e20f1b186cbe5d5a17d10556c89796 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Wed, 20 Jul 2016 14:37:09 +1000 Subject: [PATCH] d3d9: Adjust D3DCOLOR_ARGB to avoid shift overflow. Signed-off-by: Jan Schmidt Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- include/d3d9types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/d3d9types.h b/include/d3d9types.h index 8ebedcc050a..82e5112aa03 100644 --- a/include/d3d9types.h +++ b/include/d3d9types.h @@ -39,7 +39,7 @@ #define D3DCLIPPLANE4 (1 << 4) #define D3DCLIPPLANE5 (1 << 5) -#define D3DCOLOR_ARGB(a,r,g,b) ((D3DCOLOR)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff))) +#define D3DCOLOR_ARGB(a,r,g,b) ((D3DCOLOR)((((a)&0xffu)<<24)|(((r)&0xffu)<<16)|(((g)&0xffu)<<8)|((b)&0xffu))) #define D3DCOLOR_COLORVALUE(r,g,b,a) D3DCOLOR_RGBA((DWORD)((r)*255.f),(DWORD)((g)*255.f),(DWORD)((b)*255.f),(DWORD)((a)*255.f)) #define D3DCOLOR_RGBA(r,g,b,a) D3DCOLOR_ARGB(a,r,g,b) #define D3DCOLOR_XRGB(r,g,b) D3DCOLOR_ARGB(0xff,r,g,b)