Author: tkreuzer
Date: Sun Aug  8 07:14:11 2010
New Revision: 48485

URL: http://svn.reactos.org/svn/reactos?rev=48485&view=rev
Log:
[WIN32K]
Fix a bug when premultiplying the color values: The / operator has a higher 
precedence than *=, so "x *= byte / 0xff", is always 0 unless byte == 0xff.

Modified:
    branches/reactos-yarotows/subsystems/win32/win32k/ntuser/cursoricon.c

Modified: branches/reactos-yarotows/subsystems/win32/win32k/ntuser/cursoricon.c
URL: 
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win32/win32k/ntuser/cursoricon.c?rev=48485&r1=48484&r2=48485&view=diff
==============================================================================
--- branches/reactos-yarotows/subsystems/win32/win32k/ntuser/cursoricon.c 
[iso-8859-1] (original)
+++ branches/reactos-yarotows/subsystems/win32/win32k/ntuser/cursoricon.c 
[iso-8859-1] Sun Aug  8 07:14:11 2010
@@ -1352,9 +1352,9 @@
             for (j = 0; j < psurf->SurfObj.sizlBitmap.cx; j++)
             {
                 Alpha = ptr[3];
-                ptr[0] *= Alpha / 0xff;
-                ptr[1] *= Alpha / 0xff;
-                ptr[2] *= Alpha / 0xff;
+                ptr[0] = (ptr[0] * Alpha) / 0xff;
+                ptr[1] = (ptr[1] * Alpha) / 0xff;
+                ptr[2] = (ptr[2] * Alpha) / 0xff;
 
                                ptr += 4;
             }


Reply via email to