From 2eeb338e906d0873c6d5386adfbaf82348edd04c Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Wed, 25 Jul 2018 14:14:45 +0200 Subject: Ignore cuesheet title truncation Change-Id: I0de8a1468379f60140fb30b6c086fe15ea753da2 --- apps/cuesheet.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/cuesheet.c b/apps/cuesheet.c index 52b8c5703b..708c6763b1 100644 --- a/apps/cuesheet.c +++ b/apps/cuesheet.c @@ -361,10 +361,16 @@ void browse_cuesheet(struct cuesheet *cue) int action; bool done = false; char title[MAX_PATH]; + int len; + struct cuesheet_file cue_file; struct mp3entry *id3 = audio_current_track(); - snprintf(title, MAX_PATH, "%s: %s", cue->performer, cue->title); + len = snprintf(title, sizeof(title), "%s: %s", cue->performer, cue->title); + + if ((unsigned) len > sizeof(title)) + DEBUGF("browse_cuesheet title truncated\n"); + gui_synclist_init(&lists, list_get_name_cb, cue, false, 2, NULL); gui_synclist_set_nb_items(&lists, 2*cue->track_count); gui_synclist_set_title(&lists, title, 0); -- cgit v1.2.3