Fix playlist issues with extract_value - the name of the last playlist

entry in history list was being reused for the next playlist entry
This commit is contained in:
twinaphex 2018-01-01 20:17:41 +01:00
parent f611d1c357
commit 07f13876fc

View File

@ -142,14 +142,14 @@ static char *extract_value(char *line, bool is_value)
{ {
line++; line++;
if (*line == '"') if (*line == '"')
return strdup(""); return NULL;
tok = strtok_r(line, "\"", &save); tok = strtok_r(line, "\"", &save);
} }
/* We don't have that. Read until next space. */ /* We don't have that. Read until next space. */
else if (*line != '\0') /* Nothing */ else if (*line != '\0') /* Nothing */
tok = strtok_r(line, " \n\t\f\r\v", &save); tok = strtok_r(line, " \n\t\f\r\v", &save);
if (tok) if (tok && *tok)
return strdup(tok); return strdup(tok);
return NULL; return NULL;
} }