Add BYTE casts in RGB macro

Warren_Baird at cimmetry.com Warren_Baird at cimmetry.com
Wed Feb 5 17:27:28 CST 2003



ChangeLog:

     Added BYTE explicit casts in RGB macro definition.

Description:

     Wine's definition of RGB was missing a few explicit casts that were present
     under Windows.

Warren Baird : Warren_Baird at cimmetry.com

diff -ur clean/wine/include/wingdi.h  wine/include/wingdi.h
--- clean/wine/include/wingdi.h    Wed Jan 29 15:31:07 2003
+++ wine/include/wingdi.h     Mon Feb  3 10:48:31 2003
@@ -414,7 +414,7 @@

   /* 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)))






More information about the wine-patches mailing list