diff --git a/src/structs.h b/src/structs.h index 70d1106..0182a9f 100644 --- a/src/structs.h +++ b/src/structs.h @@ -41,7 +41,7 @@ typedef struct { } PointF; struct Texture { - char name[MAX_NAME_LENGTH]; + char name[MAX_DESCRIPTION_LENGTH]; long hash; SDL_Texture *texture; Texture *next; diff --git a/src/system/textures.c b/src/system/textures.c index ebad338..f85ed5a 100644 --- a/src/system/textures.c +++ b/src/system/textures.c @@ -48,7 +48,7 @@ static void addTextureToCache(char *name, SDL_Texture *texture) new = malloc(sizeof(Texture)); memset(new, 0, sizeof(Texture)); - STRNCPY(new->name, name, MAX_NAME_LENGTH); + STRNCPY(new->name, name, MAX_DESCRIPTION_LENGTH); new->texture = texture; t->next = new; @@ -84,6 +84,8 @@ SDL_Texture *getTexture(char *filename) } } + SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_DEBUG, "%s not in texture cache", filename); + return loadTexture(filename); }