null char set while reading text files

This commit is contained in:
2020-10-28 19:02:26 +01:00
parent fec1c8f40c
commit b24fef08bf

View File

@ -21,5 +21,6 @@ char* acl_ReadTextFile(const char *filePath, bool *sucess){
size_t readReturn = fread(buffer, lSize, 1, fp);
fclose(fp);
*sucess = readReturn == 1;
buffer[lSize] = '\0';
return buffer;
}