fix bug 421: database read failed with newline in ID3-tag
git-svn-id: https://svn.musicpd.org/mpd/trunk@3231 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
ead82e4d5a
commit
a97110661c
@ -430,13 +430,13 @@ inline static void appendToTagItems(MpdTag * tag, int type, char * value,
|
||||
dup[len] = '\0';
|
||||
|
||||
fixUtf8(dup);
|
||||
stripReturnChar(dup);
|
||||
|
||||
tag->numOfItems++;
|
||||
tag->items = realloc(tag->items, tag->numOfItems*sizeof(MpdTagItem));
|
||||
|
||||
tag->items[i].type = type;
|
||||
tag->items[i].value = getTagItemString(type, dup);
|
||||
//tag->items[i].value = strdup(dup);
|
||||
|
||||
free(dup);
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ char * strDupToUpper(char * str) {
|
||||
}
|
||||
|
||||
void stripReturnChar(char * string) {
|
||||
while(string && (string = strstr(string,"\n"))) {
|
||||
while(string && (string = strchr(string,'\n'))) {
|
||||
*string = ' ';
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user