Dmitry Timoshkov : gdiplus: Make sure that GdipBitmapLockBits stores valid lockmode.

Alexandre Julliard julliard at winehq.org
Tue Jul 17 11:05:34 CDT 2012


Module: wine
Branch: master
Commit: c108fd6bf91f6cf4058905161e36e18bccc44ed9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c108fd6bf91f6cf4058905161e36e18bccc44ed9

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Tue Jul 17 14:57:40 2012 +0900

gdiplus: Make sure that GdipBitmapLockBits stores valid lockmode.

---

 dlls/gdiplus/image.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
index f7bfd1a..cdbf7bf 100644
--- a/dlls/gdiplus/image.c
+++ b/dlls/gdiplus/image.c
@@ -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;




More information about the wine-cvs mailing list