Browse Source

`LoadText()` tweak (#1113)

Guarantee string is zero-terminated
pull/1118/head
brankoku 5 years ago
committed by GitHub
parent
commit
572969d8b7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/rlgl.h

+ 3
- 1
src/rlgl.h View File

@ -3013,8 +3013,10 @@ char *LoadText(const char *fileName)
if (count < size)
{
text = RL_REALLOC(text, count + 1);
text[count] = '\0';
}
// zero-terminate the string
text[count] = '\0';
}
fclose(textFile);

Loading…
Cancel
Save