|
|
|
@ -5079,25 +5079,18 @@ static const char **GetTextLines(const char *text, int *count) |
|
|
|
int textSize = (int)strlen(text); |
|
|
|
|
|
|
|
lines[0] = text; |
|
|
|
int len = 0; |
|
|
|
*count = 1; |
|
|
|
//int lineSize = 0; // Stores current line size, not returned |
|
|
|
|
|
|
|
for (int i = 0, k = 0; (i < textSize) && (*count < RAYGUI_MAX_TEXT_LINES); i++) |
|
|
|
{ |
|
|
|
if (text[i] == '\n') |
|
|
|
{ |
|
|
|
//lineSize = len; |
|
|
|
k++; |
|
|
|
lines[k] = &text[i + 1]; // WARNING: next value is valid? |
|
|
|
len = 0; |
|
|
|
lines[k] = &text[i + 1]; // WARNING: next value is valid? |
|
|
|
*count += 1; |
|
|
|
} |
|
|
|
else len++; |
|
|
|
} |
|
|
|
|
|
|
|
//lines[*count - 1].size = len; |
|
|
|
|
|
|
|
return lines; |
|
|
|
} |
|
|
|
|
|
|
|
|