]> granicus.if.org Git - libass/commitdiff
In case 2 styles have the same name, prefer the latest one.
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Mon, 19 May 2008 18:37:27 +0000 (18:37 +0000)
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Mon, 19 May 2008 18:37:27 +0000 (18:37 +0000)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26839 b3059339-0415-0410-9bf9-f77b7e298cf2

libass/ass.c

index 5c750d685202867bb8c96c56288037287dc76f5d..df65dbda468fe38c6b4720e39d6506a9465bb8f5 100644 (file)
@@ -163,7 +163,7 @@ static void rskip_spaces(char** str, char* limit) {
 static int lookup_style(ass_track_t* track, char* name) {
        int i;
        if (*name == '*') ++name; // FIXME: what does '*' really mean ?
-       for (i=0; i<track->n_styles; ++i) {
+       for (i = track->n_styles - 1; i >= 0; --i) {
                // FIXME: mb strcasecmp ?
                if (strcmp(track->styles[i].Name, name) == 0)
                        return i;