aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_lyrics.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/screen_lyrics.c')
-rw-r--r--src/screen_lyrics.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c
index 927b3dd9c..b1812de31 100644
--- a/src/screen_lyrics.c
+++ b/src/screen_lyrics.c
@@ -26,6 +26,7 @@
#include "screen_utils.h"
#include "strfsong.h"
#include "lyrics.h"
+#include "charset.h"
#include "gcc.h"
#define _GNU_SOURCE
@@ -221,10 +222,17 @@ static int store_lyr_hd(void)
static const char *
list_callback(unsigned idx, mpd_unused int *highlight, mpd_unused void *data)
{
+ static char buffer[256];
+ char *value;
+
if (idx >= current.lines->len)
return NULL;
- return g_ptr_array_index(current.lines, idx);
+ value = utf8_to_locale(g_ptr_array_index(current.lines, idx));
+ g_strlcpy(buffer, value, sizeof(buffer));
+ free(value);
+
+ return buffer;
}