From 0549ac1b1b715dae384cf6ecc63cce19c3f3eb7e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 17 Jan 2010 17:46:19 +0100 Subject: [PATCH] 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. --- NEWS | 1 + src/screen_browser.c | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) 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; } -- 2.30.2