Vincent Povirk : gdiplus: Only clip strings if rectangle width and height are positive.

Alexandre Julliard julliard at winehq.org
Thu Aug 15 13:12:47 CDT 2013


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

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Tue Aug 13 16:52:18 2013 -0500

gdiplus: Only clip strings if rectangle width and height are positive.

---

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

diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 76af444..79e4c7c 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -5000,7 +5000,8 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
     if (scaled_rect.Height >= 1 << 23) scaled_rect.Height = 1 << 23;
 
     if (!(format_flags & StringFormatFlagsNoClip) &&
-        scaled_rect.Width != 1 << 23 && scaled_rect.Height != 1 << 23)
+        scaled_rect.Width != 1 << 23 && scaled_rect.Height != 1 << 23 &&
+        rect->Width > 0.0 && rect->Height > 0.0)
     {
         /* FIXME: If only the width or only the height is 0, we should probably still clip */
         rgn = CreatePolygonRgn(corners, 4, ALTERNATE);




More information about the wine-cvs mailing list