song_save: don't fail on empty tag values

If a tag value is an empty string, the space after the colon was
removed by g_strchomp().  Fix this by removing the space check and
using g_strchug() on the return value.
This commit is contained in:
Max Kellermann 2009-01-14 13:44:14 +01:00
parent 3c6a85d8f7
commit 642b861526

View File

@ -95,9 +95,9 @@ matchesAnMpdTagItemKey(char *buffer, enum tag_type *itemType)
size_t len = strlen(mpdTagItemKeys[i]);
if (0 == strncmp(mpdTagItemKeys[i], buffer, len) &&
buffer[len] == ':' && buffer[len + 1] == ' ') {
buffer[len] == ':') {
*itemType = i;
return buffer + len + 2;
return g_strchug(buffer + len + 1);
}
}