# HG changeset patch # User laaz # Date 1010793772 0 # Node ID 0eb21bf98baacbf628602ccd77e9c0a2706ed2cf # Parent 492df9b2b1cf5248f950500b6c57ffe269dcc783 fixed mpsub bug requested by Gabucino diff -r 492df9b2b1cf -r 0eb21bf98baa subreader.c --- a/subreader.c Fri Jan 11 22:33:44 2002 +0000 +++ b/subreader.c Sat Jan 12 00:02:52 2002 +0000 @@ -404,7 +404,10 @@ current->end=(int) mpsub_position; while (num < SUB_MAX_TEXT) { - if (!fgets (line, LINE_LEN, fd)) return NULL; + if (!fgets (line, LINE_LEN, fd)) { + if (num == 0) return NULL; + else return current; + } p=line; while (isspace(*p)) p++; if (eol(*p) && num > 0) return current; @@ -414,7 +417,7 @@ *q='\0'; if (strlen(p)) { current->text[num]=strdup(p); - printf (">%s<\n",p); +// printf (">%s<\n",p); current->lines = ++num; } else { if (num) return current;