mirror of
https://github.com/ocornut/imgui.git
synced 2025-12-19 12:55:34 +00:00
Text: fixed word-wrapping function reading from *text_end when passed a string range. (#9107)
Likely caused by 4d4889bf1b (#5720)
This commit is contained in:
@@ -64,6 +64,9 @@ Other Changes:
|
|||||||
between hard minimum window size and table minimum size).
|
between hard minimum window size and table minimum size).
|
||||||
- Fixed an issue where submitting non-integer row heights would eventually
|
- Fixed an issue where submitting non-integer row heights would eventually
|
||||||
advance table parent layout by +0/+1 depending on its visibility.
|
advance table parent layout by +0/+1 depending on its visibility.
|
||||||
|
- Text:
|
||||||
|
- Fixed low-level word-wrapping function reading from *text_end when passed
|
||||||
|
a string range. (#9107) [@achabense]
|
||||||
- Scrollbar: fixed a codepath leading to a divide-by-zero (which would not be
|
- Scrollbar: fixed a codepath leading to a divide-by-zero (which would not be
|
||||||
noticeable by user but detected by sanitizers). (#9089) [@judicaelclair]
|
noticeable by user but detected by sanitizers). (#9089) [@judicaelclair]
|
||||||
- Debug Tools:
|
- Debug Tools:
|
||||||
|
|||||||
@@ -5364,7 +5364,7 @@ const char* ImTextCalcWordWrapNextLineStart(const char* text, const char* text_e
|
|||||||
if ((flags & ImDrawTextFlags_WrapKeepBlanks) == 0)
|
if ((flags & ImDrawTextFlags_WrapKeepBlanks) == 0)
|
||||||
while (text < text_end && ImCharIsBlankA(*text))
|
while (text < text_end && ImCharIsBlankA(*text))
|
||||||
text++;
|
text++;
|
||||||
if (*text == '\n')
|
if (text < text_end && *text == '\n')
|
||||||
text++;
|
text++;
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user