gdiplus: Copy the bits on bitmap unlock if the write flag is set.

The read and write flags are independent, so a read flag being set doesn't
imply we can quit early.
oldstable
Vincent Povirk 2011-02-24 16:09:17 -06:00 committed by Alexandre Julliard
parent d086af1d36
commit 58eb96c9e7
2 changed files with 2 additions and 2 deletions

View File

@ -1048,7 +1048,7 @@ GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap* bitmap,
if(lockeddata->Reserved & ImageLockModeUserInputBuf)
return NotImplemented;
if(lockeddata->Reserved & ImageLockModeRead){
if(!(lockeddata->Reserved & ImageLockModeWrite)){
if(!(--bitmap->numlocks))
bitmap->lockmode = 0;

View File

@ -657,7 +657,7 @@ static void test_LockBits(void)
stat = GdipBitmapGetPixel(bm, 2, 3, &color);
expect(Ok, stat);
todo_wine expect(0xffff8800, color);
expect(0xffff8800, color);
/* write, conversion */
stat = GdipBitmapLockBits(bm, &rect, ImageLockModeWrite, PixelFormat32bppARGB, &bd);