Commit c108fd6b authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

gdiplus: Make sure that GdipBitmapLockBits stores valid lockmode.

parent 986b9816
...@@ -953,7 +953,7 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect, ...@@ -953,7 +953,7 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect,
lockeddata->Scan0 = bitmap->bits + (bitspp / 8) * act_rect.X + lockeddata->Scan0 = bitmap->bits + (bitspp / 8) * act_rect.X +
bitmap->stride * act_rect.Y; bitmap->stride * act_rect.Y;
bitmap->lockmode = flags; bitmap->lockmode = flags | ImageLockModeRead;
bitmap->numlocks++; bitmap->numlocks++;
return Ok; return Ok;
...@@ -1022,7 +1022,7 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect, ...@@ -1022,7 +1022,7 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect,
} }
} }
bitmap->lockmode = flags; bitmap->lockmode = flags | ImageLockModeRead;
bitmap->numlocks++; bitmap->numlocks++;
bitmap->lockx = act_rect.X; bitmap->lockx = act_rect.X;
bitmap->locky = act_rect.Y; bitmap->locky = act_rect.Y;
......
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