diff options
author | William Wilgus <me.theuser@yahoo.com> | 2018-07-25 14:14:45 +0200 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2018-07-25 14:14:45 +0200 |
commit | 2eeb338e906d0873c6d5386adfbaf82348edd04c (patch) | |
tree | 5679c0d465c9f27d79dd6c5bee969e13168e181b /apps | |
parent | bdbc7f7b7b26fe7ec0dac6d58583e3086b7f7f5c (diff) |
Ignore cuesheet title truncation
Change-Id: I0de8a1468379f60140fb30b6c086fe15ea753da2
Diffstat (limited to 'apps')
-rw-r--r-- | apps/cuesheet.c | 8 |
1 files changed, 7 insertions, 1 deletions
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); |