PictureFlow: fix_path_part checked too many chars

Shouldn't have any effect if album_name
is null-terminated, but still....

Change-Id: I51acb6c7858347d3bd922758ac4f0fcde349c9e1
This commit is contained in:
Christian Soffke 2023-01-14 22:54:20 +01:00
parent f441d6bf05
commit 4d53d1b52b

View file

@ -4190,7 +4190,7 @@ static int context_menu(void)
/* add a leading slash so that catalog_add_to_a_playlist
later prefills the name when creating a new playlist */
rb->snprintf(album_name, MAX_PATH, "/%s", get_album_name(center_index));
rb->fix_path_part(album_name, 1, sizeof(album_name));
rb->fix_path_part(album_name, 1, sizeof(album_name) - 2);
file_name = album_name;
attr = ATTR_DIRECTORY;
}