In case 2 styles have the same name, prefer the latest one.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26839 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
eugeni 2008-05-19 18:37:27 +00:00
parent a560f84301
commit bbfb156539
1 changed files with 1 additions and 1 deletions

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