mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Fixed a text rendering/clipping bug introduced in 1.66 (on 2018-10-12, commit ede3a3b9
) that affect single ImDrawList::AddText() calls with single strings larger than 10k. Text/TextUnformatted() calls were not affected, but e.g. InputText() was.
This commit is contained in:
@ -2662,7 +2662,7 @@ void ImFont::RenderText(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col
|
||||
while (y_end < clip_rect.w && s_end < text_end)
|
||||
{
|
||||
s_end = (const char*)memchr(s_end, '\n', text_end - s_end);
|
||||
s = s ? s + 1 : text_end;
|
||||
s_end = s_end ? s_end + 1 : text_end;
|
||||
y_end += line_height;
|
||||
}
|
||||
text_end = s_end;
|
||||
|
Reference in New Issue
Block a user