move elem0_path

This commit is contained in:
twinaphex 2015-12-06 21:23:18 +01:00
parent d84ffcc915
commit 4218ff7781

View File

@ -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);