summaryrefslogtreecommitdiffstats
path: root/apps/gui/icon.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/icon.c')
-rw-r--r--apps/gui/icon.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/gui/icon.c b/apps/gui/icon.c
index 2c09f88852..9deb1a0c65 100644
--- a/apps/gui/icon.c
+++ b/apps/gui/icon.c
@@ -182,7 +182,9 @@ static void load_icons(const char* filename, enum Iconset iconset,
ic->handle = 0;
if (filename[0] && filename[0] != '-')
{
- fd = open_pathfmt(O_RDONLY, ICON_DIR "/%s.bmp", filename);
+ char fname[MAX_PATH];
+ fd = open_pathfmt(fname, sizeof(fname), O_RDONLY,
+ ICON_DIR "/%s.bmp", filename);
if (fd < 0)
return;
buf_size = read_bmp_fd(fd, &ic->bmp, 0,