Преглед изворни кода

`LoadText()` tweak (#1113)

Guarantee string is zero-terminated
pull/1118/head
brankoku пре 6 година
committed by GitHub
родитељ
комит
572969d8b7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 измењених фајлова са 3 додато и 1 уклоњено
  1. +3
    -1
      src/rlgl.h

+ 3
- 1
src/rlgl.h Прегледај датотеку

@ -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…
Откажи
Сачувај