mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-20 01:34:20 +00:00
Debug Tools: fixed DebugTextEncoding() potentially reading out of bounds if provided a trailing truncated UTF-8 sequence.
This commit is contained in:
parent
2a194e21a0
commit
8df962a6ed
4 changed files with 14 additions and 7 deletions
|
|
@ -5023,7 +5023,9 @@ const ImWchar* ImFontAtlas::GetGlyphRangesVietnamese()
|
|||
|
||||
void ImFontGlyphRangesBuilder::AddText(const char* text, const char* text_end)
|
||||
{
|
||||
while (text_end ? (text < text_end) : *text)
|
||||
if (text_end == NULL)
|
||||
text_end = text + strlen(text);
|
||||
while (text < text_end)
|
||||
{
|
||||
unsigned int c = 0;
|
||||
int c_len = ImTextCharFromUtf8(&c, text, text_end);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue