Vincent Povirk : gdiplus: Fix pointer math for the 64-bit tests.
Alexandre Julliard
julliard at winehq.org
Tue Oct 4 17:43:03 CDT 2011
Module: wine
Branch: master
Commit: 203d29d93aebce08548c38c0d2d3b9d41d114cc4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=203d29d93aebce08548c38c0d2d3b9d41d114cc4
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Tue Oct 4 14:11:06 2011 -0500
gdiplus: Fix pointer math for the 64-bit tests.
---
dlls/gdiplus/gdiplus.c | 2 +-
dlls/gdiplus/image.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/gdiplus/gdiplus.c b/dlls/gdiplus/gdiplus.c
index 8026f6e..9c3478b 100644
--- a/dlls/gdiplus/gdiplus.c
+++ b/dlls/gdiplus/gdiplus.c
@@ -407,7 +407,7 @@ BOOL lengthen_path(GpPath *path, INT len)
void convert_32bppARGB_to_32bppPARGB(UINT width, UINT height,
BYTE *dst_bits, INT dst_stride, const BYTE *src_bits, INT src_stride)
{
- UINT x, y;
+ INT x, y;
for (y=0; y<height; y++)
{
const BYTE *src=src_bits+y*src_stride;
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
index 4ae1d64..ce14ef6 100644
--- a/dlls/gdiplus/image.c
+++ b/dlls/gdiplus/image.c
@@ -1404,7 +1404,7 @@ GpStatus WINGDIPAPI GdipCreateHBITMAPFromBitmap(GpBitmap* bitmap,
if (result)
{
lockeddata.Stride = -width * 4;
- lockeddata.Scan0 = bits - (lockeddata.Stride * (height - 1));
+ lockeddata.Scan0 = bits + (width * 4 * (height - 1));
stat = GdipBitmapLockBits(bitmap, NULL, ImageLockModeRead|ImageLockModeUserInputBuf,
PixelFormat32bppPARGB, &lockeddata);
More information about the wine-cvs
mailing list