Commit abd0cddc authored by Haoyang Chen's avatar Haoyang Chen Committed by Alexandre Julliard

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: 's avatarHaoyang Chen <chenhaoyang@uniontech.com> Signed-off-by: 's avatarHuw Davies <huw@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 176ca7b8
......@@ -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 );
}
......
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