diff options
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++; |