From daefd53a46cd2ac7926f6e33f356bdb40eab598f Mon Sep 17 00:00:00 2001 From: achabense <60953653+achabense@users.noreply.github.com> Date: Fri, 5 Dec 2025 18:36:16 +0800 Subject: [PATCH] Fix buffer overflow --- imgui_draw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_draw.cpp b/imgui_draw.cpp index bee1503de..1b83fea92 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -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; }