Fix addressing the magic GDIOBJHDR field in
authorRein Klazes <wijn@wanadoo.nl>
Mon, 18 Apr 2005 15:37:32 +0000 (15:37 +0000)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 18 Apr 2005 15:37:32 +0000 (15:37 +0000)
SYSCOLOR_MakeObjectSystem.

windows/syscolor.c

index cf7cf389c89c893f20fc9157f3c5089241db627d..9798e9e904f8879687aa87f21b9db5d085d39f06 100644 (file)
@@ -109,9 +109,9 @@ static void SYSCOLOR_MakeObjectSystem( HGDIOBJ16 handle, BOOL set)
 
         /* touch the "system" bit of the wMagic field of a GDIOBJHDR */
         if (set)
-            *(ptr+1) &= ~OBJECT_NOSYSTEM;
+            *ptr &= ~OBJECT_NOSYSTEM;
         else
-            *(ptr+1) |= OBJECT_NOSYSTEM;
+            *ptr |= OBJECT_NOSYSTEM;
         LOCAL_Unlock( heap_sel, handle );
     }
 }