Silence valgrind memcheck warning

This commit is contained in:
twinaphex 2017-04-23 20:26:31 +02:00
parent 13e4148996
commit edadba1ec7

View File

@ -612,7 +612,7 @@ int filestream_read_file(const char *path, void **buf, ssize_t *len)
/* Allow for easy reading of strings to be safe.
* Will only work with sane character formatting (Unix). */
((char*)content_buf)[content_buf_size] = '\0';
((char*)content_buf)[ret] = '\0';
if (len)
*len = ret;