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.