diff options
Diffstat (limited to 'apps/gui/icon.c')
-rw-r--r-- | apps/gui/icon.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/gui/icon.c b/apps/gui/icon.c index e78aa6841c..2c09f88852 100644 --- a/apps/gui/icon.c +++ b/apps/gui/icon.c @@ -32,6 +32,7 @@ #include "bmp.h" #include "filetypes.h" #include "language.h" +#include "misc.h" #include "bitmaps/default_icons.h" #if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1) @@ -181,10 +182,7 @@ static void load_icons(const char* filename, enum Iconset iconset, ic->handle = 0; if (filename[0] && filename[0] != '-') { - char path[MAX_PATH]; - - snprintf(path, sizeof(path), ICON_DIR "/%s.bmp", filename); - fd = open(path, O_RDONLY); + fd = open_pathfmt(O_RDONLY, ICON_DIR "/%s.bmp", filename); if (fd < 0) return; buf_size = read_bmp_fd(fd, &ic->bmp, 0, |