Skip to content

Commit

Permalink
Treat empty Style name as "Default"
Browse files Browse the repository at this point in the history
Fixes libass#714.
  • Loading branch information
astiob committed Nov 8, 2023
1 parent e643905 commit a196fdb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libass/ass.c
Original file line number Diff line number Diff line change
Expand Up @@ -717,8 +717,10 @@ static int process_style(ASS_Track *track, char *str)
style->Italic = !!style->Italic;
style->Underline = !!style->Underline;
style->StrikeOut = !!style->StrikeOut;
if (!style->Name)
if (!style->Name || !*style->Name) {
free(style->Name);
style->Name = strdup("Default");
}
if (!style->FontName)
style->FontName = strdup("Arial");
if (!style->Name || !style->FontName) {
Expand Down

0 comments on commit a196fdb

Please sign in to comment.