Alexandre Julliard : comctl32: Fix handling of bitmap header size for V4/ V5 bitmaps.

Alexandre Julliard julliard at winehq.org
Wed Apr 21 10:40:24 CDT 2010


Module: wine
Branch: master
Commit: 5d6e052926c12518b587851540591a5ae5435efe
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5d6e052926c12518b587851540591a5ae5435efe

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Apr 21 14:56:37 2010 +0200

comctl32: Fix handling of bitmap header size for V4/V5 bitmaps.

---

 dlls/comctl32/commctrl.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c
index 1283bad..eb0f6b5 100644
--- a/dlls/comctl32/commctrl.c
+++ b/dlls/comctl32/commctrl.c
@@ -922,8 +922,7 @@ CreateMappedBitmap (HINSTANCE hInstance, INT_PTR idBitmap, UINT wFlags,
     if (hbm) {
 	HDC hdcDst = CreateCompatibleDC (hdcScreen);
 	HBITMAP hbmOld = SelectObject (hdcDst, hbm);
-	const BYTE *lpBits = (const BYTE *)(lpBitmap + 1);
-	lpBits += nColorTableSize * sizeof(RGBQUAD);
+	const BYTE *lpBits = (const BYTE *)lpBitmap + nSize;
 	StretchDIBits (hdcDst, 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight,
 		         lpBits, (LPBITMAPINFO)lpBitmapInfo, DIB_RGB_COLORS,
 		         SRCCOPY);




More information about the wine-cvs mailing list