11 Dec
2023
11 Dec
'23
4:52 p.m.
Esme Povirk (@madewokherd) commented about dlls/gdiplus/graphics.c:
+ DeleteObject(hfont); + IMLangFontLink_Release(iMLFL); +} + +struct gdip_font_link_section *get_font_link_section(struct gdip_font_link_info *font_link_info, DWORD index) +{ + struct gdip_font_link_section *section = &font_link_info->sections[0]; + for (int i = 0; i < font_link_info->count; ++i) + { + section = &font_link_info->sections[i]; + if (index <= section->index && (index - section->index) < section->len) + break; + } + + return section; +} This approach is unnecessarily quadratic, since the caller will only ever retrieve these in order.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/4082#note_55713