Update raygui.h

This commit is contained in:
Ray
2026-02-20 16:02:10 +01:00
parent 9f70fcbbfb
commit f8f7dd3296

View File

@ -5131,12 +5131,11 @@ static const char **GetTextLines(const char *text, int *count)
lines[0] = text; lines[0] = text;
*count = 1; *count = 1;
for (int i = 0, k = 0; (i < textLength) && (*count < RAYGUI_MAX_TEXT_LINES); i++) for (int i = 0; (i < textLength) && (*count < RAYGUI_MAX_TEXT_LINES); i++)
{ {
if (text[i] == '\n') if ((text[i] == '\n') && ((i + 1) < textLength))
{ {
k++; lines[*count] = &text[i + 1];
lines[k] = &text[i + 1]; // WARNING: next value is valid?
*count += 1; *count += 1;
} }
} }