changeset 6242:9c8c3b5e6658

possible sig11 fixed in .rt parser (weisskreuzova.zip)
author arpi
date Thu, 30 May 2002 17:44:58 +0000
parents 34b3bdd52d01
children 20389bf27dd4
files subreader.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/subreader.c	Thu May 30 14:45:13 2002 +0000
+++ b/subreader.c	Thu May 30 17:44:58 2002 +0000
@@ -149,6 +149,8 @@
     int len=0;
     char *p=source;
     
+//    printf("src=%p  dest=%p  \n",source,dest);
+
     while ( !eol(*p) && *p!= '|' ) {
 	p++,len++;
     }
@@ -358,11 +360,14 @@
 	current->end   = b1*360000+b2*6000+b3*100+b4/10;
 	p=line;	p+=plen;i=0;
 	// TODO: I don't know what kind of convention is here for marking multiline subs, maybe <br/> like in xml?
-	next = strstr(line,"<clear/>")+8;i=0;
-	while ((next =sub_readtext (next, &(current->text[i])))) {
+	next = strstr(line,"<clear/>");
+	if(next && strlen(next)>8){
+	  next+=8;i=0;
+	  while ((next =sub_readtext (next, &(current->text[i])))) {
 		if (current->text[i]==ERR) {return ERR;}
 		i++;
 		if (i>=SUB_MAX_TEXT) { printf ("Too many lines in a subtitle\n");current->lines=i;return current;}
+	  }
 	}
 			current->lines=i+1;
     }