1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-12-01 02:37:24 +01:00

TextUnformatted: Fixed rare crash bug with large blurb of text (2k+) not finishing with a '\n' and fully above the clipping Y line. (#535)

This commit is contained in:
ocornut 2016-02-24 22:43:17 +01:00
parent 4afe67cdc8
commit 1881cbe860

View File

@ -5076,6 +5076,8 @@ void ImGui::TextUnformatted(const char* text, const char* text_end)
while (line < text_end && lines_skipped < lines_skippable) while (line < text_end && lines_skipped < lines_skippable)
{ {
const char* line_end = strchr(line, '\n'); const char* line_end = strchr(line, '\n');
if (!line_end)
line_end = text_end;
line = line_end + 1; line = line_end + 1;
lines_skipped++; lines_skipped++;
} }