Commit 814f9cf7 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

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

parent 1c66fdd0
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment