Commit 203d29d9 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

gdiplus: Fix pointer math for the 64-bit tests.

parent db882bfb
...@@ -407,7 +407,7 @@ BOOL lengthen_path(GpPath *path, INT len) ...@@ -407,7 +407,7 @@ BOOL lengthen_path(GpPath *path, INT len)
void convert_32bppARGB_to_32bppPARGB(UINT width, UINT height, void convert_32bppARGB_to_32bppPARGB(UINT width, UINT height,
BYTE *dst_bits, INT dst_stride, const BYTE *src_bits, INT src_stride) 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++) for (y=0; y<height; y++)
{ {
const BYTE *src=src_bits+y*src_stride; const BYTE *src=src_bits+y*src_stride;
......
...@@ -1404,7 +1404,7 @@ GpStatus WINGDIPAPI GdipCreateHBITMAPFromBitmap(GpBitmap* bitmap, ...@@ -1404,7 +1404,7 @@ GpStatus WINGDIPAPI GdipCreateHBITMAPFromBitmap(GpBitmap* bitmap,
if (result) if (result)
{ {
lockeddata.Stride = -width * 4; lockeddata.Stride = -width * 4;
lockeddata.Scan0 = bits - (lockeddata.Stride * (height - 1)); lockeddata.Scan0 = bits + (width * 4 * (height - 1));
stat = GdipBitmapLockBits(bitmap, NULL, ImageLockModeRead|ImageLockModeUserInputBuf, stat = GdipBitmapLockBits(bitmap, NULL, ImageLockModeRead|ImageLockModeUserInputBuf,
PixelFormat32bppPARGB, &lockeddata); PixelFormat32bppPARGB, &lockeddata);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment