Commit 642b8615 authored by Max Kellermann's avatar Max Kellermann

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.
parent 3c6a85d8
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment