Huw Davies : gdi32: Fix the lines parameter of SetDIBits to be positive.

Alexandre Julliard julliard at winehq.org
Fri Jul 22 10:16:00 CDT 2011


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

Author: Huw Davies <huw at codeweavers.com>
Date:   Fri Jul 22 15:10:00 2011 +0100

gdi32: Fix the lines parameter of SetDIBits to be positive.

---

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

diff --git a/dlls/gdi32/dib.c b/dlls/gdi32/dib.c
index 995c5d7..e9f0772 100644
--- a/dlls/gdi32/dib.c
+++ b/dlls/gdi32/dib.c
@@ -271,7 +271,7 @@ INT nulldrv_StretchDIBits( PHYSDEV dev, INT xDst, INT yDst, INT widthDst, INT he
                 bm.bmBitsPixel == bpp && bm.bmPlanes == planes)
             {
                 /* fast path */
-                return SetDIBits( dev->hdc, hBitmap, 0, height, bits, info, coloruse );
+                return SetDIBits( dev->hdc, hBitmap, 0, abs( height ), bits, info, coloruse );
             }
         }
     }
@@ -295,7 +295,7 @@ INT nulldrv_StretchDIBits( PHYSDEV dev, INT xDst, INT yDst, INT widthDst, INT he
         StretchBlt( hdcMem, xSrc, abs(height) - heightSrc - ySrc, widthSrc, heightSrc,
                     dev->hdc, xDst, yDst, widthDst, heightDst, rop );
     }
-    ret = SetDIBits( hdcMem, hBitmap, 0, height, bits, info, coloruse );
+    ret = SetDIBits( hdcMem, hBitmap, 0, abs( height ), bits, info, coloruse );
     if (ret) StretchBlt( dev->hdc, xDst, yDst, widthDst, heightDst,
                          hdcMem, xSrc, abs(height) - heightSrc - ySrc, widthSrc, heightSrc, rop );
     DeleteDC( hdcMem );




More information about the wine-cvs mailing list