1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

Fix buffer overflow

This commit is contained in:
achabense 2025-12-05 18:36:16 +08:00
parent ea578fb36d
commit daefd53a46

View file

@ -5364,7 +5364,7 @@ const char* ImTextCalcWordWrapNextLineStart(const char* text, const char* text_e
if ((flags & ImDrawTextFlags_WrapKeepBlanks) == 0)
while (text < text_end && ImCharIsBlankA(*text))
text++;
if (*text == '\n')
if (text < text_end && *text == '\n')
text++;
return text;
}