ozone: don't break playlists without a hyphen in their name

This commit is contained in:
natinusala 2018-11-15 19:01:30 +01:00
parent 6f631309cd
commit 1abab059f9

View File

@ -1692,14 +1692,26 @@ static void ozone_context_reset_horizontal_list(ozone_handle_t *ozone)
/* Format : "Vendor - Console"
Remove everything before the hyphen
and the subsequent space */
char *chr = title_noext;
char *chr = title_noext;
bool hyphen_found = false;
while (*chr != '-' && *chr != '\0')
while (true)
{
if (*chr == '-')
{
hyphen_found = true;
break;
}
else if (*chr == '\0')
break;
chr++;
}
chr += 2;
if (hyphen_found)
chr += 2;
else
chr = title_noext;
node->console_name = strdup(chr);