From 0e0752c7d08ab5ca345d22764d95e8bd90912eed Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Fri, 18 Jan 2019 18:01:47 +0100 Subject: [PATCH] x11screen.c: remove usage of MAX_PATH_CHARACTERS --- src/x11screen.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/x11screen.c b/src/x11screen.c index e9640cff..cb5aa522 100644 --- a/src/x11screen.c +++ b/src/x11screen.c @@ -29,6 +29,7 @@ #include "screen.h" #include "gfx2surface.h" #include "loadsave.h" +#include "io.h" #include "gfx2log.h" Display * X11_display = NULL; @@ -328,9 +329,11 @@ void Allow_drag_and_drop(int flag) void Define_icon(void) { - char icon_path[MAX_PATH_CHARACTERS]; - snprintf(icon_path, sizeof(icon_path), "%s%s", Data_directory, "gfx2.png"); // 48x48 + char * icon_path; + + icon_path = Filepath_append_to_dir(Data_directory, "gfx2.png"); // 48x48 icon = Load_surface(icon_path, NULL); + free(icon_path); } void Set_mouse_position(void)