properly read the cursor hotspots from the resource
authorThomas Bluemel <thomas@reactsoft.com>
Tue, 27 Dec 2005 16:19:07 +0000 (16:19 +0000)
committerThomas Bluemel <thomas@reactsoft.com>
Tue, 27 Dec 2005 16:19:07 +0000 (16:19 +0000)
svn path=/trunk/; revision=20372

reactos/lib/user32/windows/icon.c

index 28d36ad..3db757a 100644 (file)
@@ -246,11 +246,11 @@ CreateIconFromResourceEx(
 
   if (! fIcon)
     {
-      wXHotspot = (WORD)*pbIconBits;
-      pbIconBits+=2;
-      wYHotspot = (WORD)*pbIconBits;
-      pbIconBits+=2;
-      cbIconBits-=4;
+      wXHotspot = *(WORD*)pbIconBits;
+      pbIconBits+=sizeof(WORD);
+      wYHotspot = *(WORD*)pbIconBits;
+      pbIconBits+=sizeof(WORD);
+      cbIconBits-=2*sizeof(WORD);
     }
   else
     {