]> git.sesse.net Git - vlc/commitdiff
Subsdec: fix small parsing issue
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 7 Apr 2013 14:35:14 +0000 (16:35 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 7 Apr 2013 14:36:20 +0000 (16:36 +0200)
Close #8392

modules/codec/subsdec.c

index 9eff50084c037997e77dc0b0e9d27e2096ffb517..a9929b573baf89ab67ba8c1da5d94cbb0c3d1daf 100644 (file)
@@ -662,14 +662,14 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle )
                 HtmlCopy( &psz_html, &psz_subtitle, "<font " );
                 HtmlPut( &psz_tag, "f" );
 
-                /* <font       color= */
-                while (*psz_subtitle == ' ')
-                    psz_subtitle++;
-
                 while( *psz_subtitle != '>' )
                 {
                     int  k;
 
+                    /* <font       color= */
+                    while (*psz_subtitle == ' ')
+                        psz_subtitle++;
+
                     for( k=0; psz_attribs[ k ]; k++ )
                     {
                         int i_len = strlen( psz_attribs[ k ] );