changeset 26807:1b34360d41de

In case 2 styles have the same name, prefer the latest one.
author eugeni
date Mon, 19 May 2008 18:37:27 +0000
parents 6b9905629396
children 78a62bde5020
files libass/ass.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libass/ass.c	Mon May 19 05:41:49 2008 +0000
+++ b/libass/ass.c	Mon May 19 18:37:27 2008 +0000
@@ -163,7 +163,7 @@
 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;