gdiplus: Make sure that GdipBitmapLockBits stores valid lockmode.

oldstable
Dmitry Timoshkov 2012-07-17 14:57:40 +09:00 committed by Alexandre Julliard
parent 986b98160b
commit c108fd6bf9
1 changed files with 2 additions and 2 deletions

View File

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