fix: null terminate the shader string buffers

This commit is contained in:
2023-09-08 20:49:38 +02:00
parent 27d6853e3e
commit 6f70018892
+1
View File
@@ -18,6 +18,7 @@ void read_shader_file(const char *path, char **buf) {
fseek(fp, 0, SEEK_SET);
*buf = malloc(filesize + 1);
(*buf)[filesize] = '\0';
size_t bytes_read = fread(*buf, filesize, 1, fp);