gdi32: Avoid exceeding the actual bitmap height.
The bottom-up case is handled earlier on. For the top-down case, 'lines' is left untouched. Signed-off-by: Haoyang Chen <chenhaoyang@uniontech.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
176ca7b87b
commit
abd0cddc5f
|
@ -824,7 +824,7 @@ INT CDECL nulldrv_SetDIBitsToDevice( PHYSDEV dev, INT x_dst, INT y_dst, DWORD cx
|
|||
}
|
||||
else if (src.y >= lines) return lines;
|
||||
}
|
||||
src_info->bmiHeader.biHeight = top_down ? -lines : lines;
|
||||
src_info->bmiHeader.biHeight = top_down ? -min( lines, height ) : lines;
|
||||
src_info->bmiHeader.biSizeImage = get_dib_image_size( src_info );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue