diff --git a/menu/cbs/menu_cbs_title.c b/menu/cbs/menu_cbs_title.c index 481305f3fb..939b726964 100644 --- a/menu/cbs/menu_cbs_title.c +++ b/menu/cbs/menu_cbs_title.c @@ -129,7 +129,6 @@ static int action_get_title_video_shader_preset(const char *path, const char *la static int action_get_title_generic(char *s, size_t len, const char *path, const char *text) { - char elem0_path[PATH_MAX_LENGTH] = {0}; struct string_list *list_path = NULL; if (path && path[0] != '\0') @@ -137,6 +136,7 @@ static int action_get_title_generic(char *s, size_t len, const char *path, if (list_path) { + char elem0_path[PATH_MAX_LENGTH] = {0}; if (list_path->size > 0) strlcpy(elem0_path, list_path->elems[0].data, sizeof(elem0_path)); string_list_free(list_path);