diff options
author | drumsetmonkey <abelleisle@roadrunner.com> | 2015-11-30 07:29:39 -0500 |
---|---|---|
committer | drumsetmonkey <abelleisle@roadrunner.com> | 2015-11-30 07:29:39 -0500 |
commit | e21db32169966b983e09b53801ee1a6d3101e57e (patch) | |
tree | 09093d48beb705e2907a27f0ffb99c3ab9b20706 /src/Texture.cpp | |
parent | 19ef54b2c5ffcaefdce352c6f195a62c05c42767 (diff) |
Look at my fancy inventory
Diffstat (limited to 'src/Texture.cpp')
-rw-r--r-- | src/Texture.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Texture.cpp b/src/Texture.cpp index b17d204..82baa71 100644 --- a/src/Texture.cpp +++ b/src/Texture.cpp @@ -54,7 +54,7 @@ namespace Texture{ SDL_FreeSurface(image); // Free the surface LoadedTexture[LoadedTextureCounter] = (struct texture_t *)malloc(sizeof(struct texture_t)); - LoadedTexture[LoadedTextureCounter]->name = (char *)malloc(strlen(fileName)); + LoadedTexture[LoadedTextureCounter]->name = (char *)malloc(safe_strlen(fileName)); LoadedTexture[LoadedTextureCounter]->tex = object; strcpy(LoadedTexture[LoadedTextureCounter]->name,fileName); LoadedTextureCounter++; |