[Wine-patches] [eter-2.1 2/2] gdiplus: Only clip strings if rectangle width and height are positive.

Vitaly Lipatov lav на etersoft.ru
Пт Апр 21 13:10:05 MSK 2017


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

diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index c9aab2ce15..4e703dccf4 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -4985,7 +4985,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);
-- 
2.12.2

-- 
Dmitry.
_______________________________________________
Wine-patches mailing list
Wine-patches на lists.etersoft.ru
http://lists.etersoft.ru/mailman/listinfo/wine-patches


Подробная информация о списке рассылки Wine-patches