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

This commit is contained in:
Vincent Povirk 2011-10-04 14:11:06 -05:00 committed by Alexandre Julliard
parent db882bfb5d
commit 203d29d93a
2 changed files with 2 additions and 2 deletions

View file

@ -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;

View file

@ -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);