From 91103da4105e40c040cf64327fb649e43d5f01d3 Mon Sep 17 00:00:00 2001 From: _ <_> Date: Wed, 4 Apr 2018 22:05:13 -0700 Subject: [PATCH] Fixed crash after getting textures list --- test/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/main.c b/test/main.c index ba8f4a9..2279796 100644 --- a/test/main.c +++ b/test/main.c @@ -124,8 +124,8 @@ void unpacktextures(const char *filedata, filedata, filesize); struct Texture **textures = NULL; - textures = (struct Texture**)malloc(texturecount); - + textures = (struct Texture**)malloc( + sizeof(struct Texture**) * texturecount); unsigned int i; unsigned int j; // k is access to index of textures.