gdiplus: Avoid negative integer overflow due to implicit type conversion.
Signed-off-by: Haoyang Chen <chenhaoyang@uniontech.com> Signed-off-by: Esme Povirk <esme@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
47ac628b4a
commit
4c4a5cb799
|
@ -972,9 +972,9 @@ static ARGB sample_bitmap_pixel(GDIPCONST GpRect *src_rect, LPBYTE bits, UINT wi
|
|||
{
|
||||
/* Tiling. Make sure co-ordinates are positive as it simplifies the math. */
|
||||
if (x < 0)
|
||||
x = width*2 + x % (width * 2);
|
||||
x = width*2 + x % (INT)(width * 2);
|
||||
if (y < 0)
|
||||
y = height*2 + y % (height * 2);
|
||||
y = height*2 + y % (INT)(height * 2);
|
||||
|
||||
if (attributes->wrap & WrapModeTileFlipX)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue