gdiplus: Fix error when drawing from a rectangle outside bitmap bounds.

This commit is contained in:
Vincent Povirk 2014-10-28 16:09:57 -05:00 committed by Alexandre Julliard
parent 0506a52266
commit 4361cbabd7
1 changed files with 4 additions and 0 deletions

View File

@ -827,6 +827,10 @@ static void get_bitmap_sample_size(InterpolationMode interpolation, WrapMode wra
right = bitmap->width-1;
if (bottom >= bitmap->height)
bottom = bitmap->height-1;
if (bottom < top || right < left)
/* entirely outside image, just sample a pixel so we don't have to
* special-case this later */
left = top = right = bottom = 0;
}
else
{