diff options
author | William Wilgus <me.theuser@yahoo.com> | 2018-12-08 04:43:44 -0600 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2018-12-08 04:47:27 -0600 |
commit | 6bfd7da97c659f96eb38051ce31fcc7ff087ed16 (patch) | |
tree | bfd20e5ba9ac887b6dc8cbf6a2d3b3373b7eedc8 | |
parent | 0f5f5c3390feb6c44da57b5f6748dca0b0a947a0 (diff) | |
download | rockbox-6bfd7da97c659f96eb38051ce31fcc7ff087ed16.tar.gz rockbox-6bfd7da97c659f96eb38051ce31fcc7ff087ed16.zip |
Fix Truncation warning in cuesheet.c->browse_cuesheet
give user concrete indication that track title has been truncated
by adding '~' at end of string
Change-Id: I53034f4a09c103eb98ae1e0ef0a8a843fd2a2c6e
-rw-r--r-- | apps/cuesheet.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/cuesheet.c b/apps/cuesheet.c index 91b56b7f8a..24df4d49da 100644 --- a/apps/cuesheet.c +++ b/apps/cuesheet.c | |||
@@ -369,7 +369,8 @@ void browse_cuesheet(struct cuesheet *cue) | |||
369 | len = snprintf(title, sizeof(title), "%s: %s", cue->performer, cue->title); | 369 | len = snprintf(title, sizeof(title), "%s: %s", cue->performer, cue->title); |
370 | 370 | ||
371 | if ((unsigned) len > sizeof(title)) | 371 | if ((unsigned) len > sizeof(title)) |
372 | DEBUGF("browse_cuesheet title truncated\n"); | 372 | title[sizeof(title) - 2] = '~'; /* give indication of truncation */ |
373 | |||
373 | 374 | ||
374 | gui_synclist_init(&lists, list_get_name_cb, cue, false, 2, NULL); | 375 | gui_synclist_init(&lists, list_get_name_cb, cue, false, 2, NULL); |
375 | gui_synclist_set_nb_items(&lists, 2*cue->track_count); | 376 | gui_synclist_set_nb_items(&lists, 2*cue->track_count); |