For some reason there was a malloc in os_read
This commit is contained in:
@@ -550,7 +550,7 @@ fn s8_t os_read(ma_arena_t *arena, s8_t path) {
|
||||
fseek(fd, 0, SEEK_END);
|
||||
long size = ftell(fd);
|
||||
fseek(fd, 0, SEEK_SET);
|
||||
char *string = malloc(size + 1);
|
||||
char *string = ma_push_array(arena, char, size + 1);
|
||||
fread(string, size, 1, fd);
|
||||
fclose(fd);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user