From 6e39dc9e27e852bcf88490ee0c5e267c90f0513b Mon Sep 17 00:00:00 2001 From: Teruaki Kawashima Date: Thu, 3 Jun 2010 13:32:12 +0000 Subject: [PATCH] Correct reusing buffers if the backdrop file is already loaded. FS#11305 by myself. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26510 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/skin_engine/skin_backdrops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/gui/skin_engine/skin_backdrops.c b/apps/gui/skin_engine/skin_backdrops.c index 77de8bdc1a..a32bfbe589 100644 --- a/apps/gui/skin_engine/skin_backdrops.c +++ b/apps/gui/skin_engine/skin_backdrops.c @@ -31,7 +31,7 @@ #if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)) static struct skin_backdrop { - char name[MAX_FILENAME+1]; + char name[MAX_PATH]; char *buffer; enum screen_type screen; } backdrops[SKINNABLE_SCREENS_COUNT*NB_SCREENS]; @@ -88,7 +88,7 @@ char* skin_backdrop_load(char* backdrop, char *bmpdir, enum screen_type screen) for(i=0;ibuffer); bdrop->screen = screen; - strlcpy(bdrop->name, backdrop, MAX_FILENAME+1); + strlcpy(bdrop->name, filename, sizeof(bdrop->name)); return loaded ? bdrop->buffer : NULL; }