From: Max Kellermann Date: Sun, 17 Jan 2010 16:46:19 +0000 (+0100) Subject: screen_browser: fixed jump to playlist file X-Git-Tag: release-0.16.1~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0549ac1b1b715dae384cf6ecc63cce19c3f3eb7e;p=ncmpc.git screen_browser: fixed jump to playlist file Don't add asterisks around the playlist file name in browser_lw_callback(). This was useless since we are using the list_window paint callback, and the formatted playlist name isn't used anymore for painting. --- diff --git a/NEWS b/NEWS index 31f5e17..5a99254 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,6 @@ ncmpc 0.17 - not yet released * screen_queue: always update the list size +* screen_browser: fixed jump to playlist file ncmpc 0.16 - (12/25/2009) diff --git a/src/screen_browser.c b/src/screen_browser.c index 6672761..45e11eb 100644 --- a/src/screen_browser.c +++ b/src/screen_browser.c @@ -45,8 +45,6 @@ #define HIGHLIGHT (0x01) #endif -static const char playlist_format[] = "*%s*"; - #ifndef NCMPC_MINI /* sync highlight flags with playlist */ @@ -112,7 +110,7 @@ browser_lw_callback(unsigned idx, void *data) mpd_entity_get_playlist(entity); char *filename = utf8_to_locale(g_basename(mpd_playlist_get_path(playlist))); - g_snprintf(buf, BUFSIZE, playlist_format, filename); + g_strlcpy(buf, filename, sizeof(buf)); g_free(filename); return buf; }