Commit b76462c9 authored by Huw D M Davies's avatar Huw D M Davies Committed by Alexandre Julliard

Stop X11DRV_RoundRect calling XDrawArc with -ve width/height params

which it did if either ellipse dimension was zero.
parent 904e20fd
......@@ -379,8 +379,10 @@ X11DRV_RoundRect( DC *dc, INT32 left, INT32 top, INT32 right,
if ((left == right) || (top == bottom))
return TRUE;
ell_width = abs( ell_width * dc->vportExtX / dc->wndExtX );
ell_height = abs( ell_height * dc->vportExtY / dc->wndExtY );
/* Make sure ell_width and ell_height are >= 1 otherwise XDrawArc gets
called with width/height < 0 */
ell_width = MAX(abs( ell_width * dc->vportExtX / dc->wndExtX ), 1);
ell_height = MAX(abs( ell_height * dc->vportExtY / dc->wndExtY ), 1);
/* Fix the coordinates */
......
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