Browse Source

Update rtext.c

pull/5365/head
Ray 2 weeks ago
parent
commit
f21c1cc6ae
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/rtext.c

+ 2
- 2
src/rtext.c View File

@ -1459,13 +1459,13 @@ char **LoadTextLines(const char *text, int *count)
int lineCount = 1;
int textSize = (int)strlen(text);
// Text pass to get required line count
// First text scan pass to get required line count
for (int i = 0; i < textSize; i++)
{
if (text[i] == '\n') lineCount++;
}
kt">char **lines = (char **)RL_CALLOC(lineCount, sizeof(char *));
lines = (char **)RL_CALLOC(lineCount, sizeof(char *));
for (int i = 0, l = 0, lineLen = 0; i <= textSize; i++)
{
if ((text[i] == '\n') || (text[i] == '\0'))

Loading…
Cancel
Save