Merge pull request #7596 from natinusala/ozone

ozone: don't break playlists without a hyphen in their name
This commit is contained in:
Twinaphex 2018-11-15 19:20:36 +01:00 committed by GitHub
commit 1dcca0ea53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);