gdiplus: Handle large input rect in GdipMeasureCharacterRanges.
This commit is contained in:
parent
6ee26aca16
commit
6b97abf930
|
@ -4739,6 +4739,9 @@ GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics* graphics,
|
|||
scaled_rect.Width = layoutRect->Width * args.rel_width;
|
||||
scaled_rect.Height = layoutRect->Height * args.rel_height;
|
||||
|
||||
if (scaled_rect.Width >= 1 << 23) scaled_rect.Width = 1 << 23;
|
||||
if (scaled_rect.Height >= 1 << 23) scaled_rect.Height = 1 << 23;
|
||||
|
||||
get_font_hfont(graphics, font, stringFormat, &gdifont, NULL);
|
||||
oldfont = SelectObject(hdc, gdifont);
|
||||
|
||||
|
|
Loading…
Reference in New Issue