aboutsummaryrefslogtreecommitdiffstats
path: root/src/src_lyrics.c
diff options
context:
space:
mode:
authorAndreas Obergrusberger <tradiaz@yahoo.de>2007-02-01 21:06:33 +0000
committerAndreas Obergrusberger <tradiaz@yahoo.de>2007-02-01 21:06:33 +0000
commit0ed1625063f33d2fb9b8bffe9b191a22de0526fa (patch)
tree9cd07b4d21f80443787a020ec57ea26071cfbad1 /src/src_lyrics.c
parent0058a29551923c8f39c52e75ea7ad97743fa2c05 (diff)
downloadmpd-0ed1625063f33d2fb9b8bffe9b191a22de0526fa.tar.gz
mpd-0ed1625063f33d2fb9b8bffe9b191a22de0526fa.tar.xz
mpd-0ed1625063f33d2fb9b8bffe9b191a22de0526fa.zip
lyrics updates, leoslyrics fixes
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5314 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/src_lyrics.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/src_lyrics.c b/src/src_lyrics.c
index 8ce9937dd..10d0dce51 100644
--- a/src/src_lyrics.c
+++ b/src/src_lyrics.c
@@ -50,7 +50,7 @@ int get_text_line(formed_text *text, int num, char *dest, int len)
memcpy(dest, &text->text->str[g_array_index(text->lines, int, num)],
linelen*sizeof(char));
}
- dest[linelen] = '\n';
+ dest[linelen] = '\n';
dest[linelen+1] = '\0';
return 0;
@@ -58,6 +58,7 @@ int get_text_line(formed_text *text, int num, char *dest, int len)
void add_text_line(formed_text *dest, const char *src, int len)
{
+
// need this because g_array_append_val doesnt work with literals
// and expat sends "\n" as an extra line everytime
if(len == 0)
@@ -75,7 +76,7 @@ void add_text_line(formed_text *dest, const char *src, int len)
if(dest->lines->len > 0) dest->val += g_array_index(dest->lines, int,
dest->lines->len-1);
}
- else if (len == 1 && dest->val != 0) dest->val = 0;
+ else if (len < 6 && dest->val != 0) dest->val = 0;
if(dest->val > 0)
{