WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit fee06a9

Browse files
achabenseocornut
authored andcommitted
Text: fixed word-wrapping function reading from *text_end when passed a string range. (#9107)
Likely caused by 4d4889b (#5720)
1 parent d71091a commit fee06a9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docs/CHANGELOG.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ Other Changes:
6464
between hard minimum window size and table minimum size).
6565
- Fixed an issue where submitting non-integer row heights would eventually
6666
advance table parent layout by +0/+1 depending on its visibility.
67+
- Text:
68+
- Fixed low-level word-wrapping function reading from *text_end when passed
69+
a string range. (#9107) [@achabense]
6770
- Scrollbar: fixed a codepath leading to a divide-by-zero (which would not be
6871
noticeable by user but detected by sanitizers). (#9089) [@judicaelclair]
6972
- Debug Tools:

imgui_draw.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5364,7 +5364,7 @@ const char* ImTextCalcWordWrapNextLineStart(const char* text, const char* text_e
53645364
if ((flags & ImDrawTextFlags_WrapKeepBlanks) == 0)
53655365
while (text < text_end && ImCharIsBlankA(*text))
53665366
text++;
5367-
if (*text == '\n')
5367+
if (text < text_end && *text == '\n')
53685368
text++;
53695369
return text;
53705370
}

0 commit comments

Comments
 (0)