[Mplayer-cvslog] CVS: main playtreeparser.c,1.6,1.7

Alban Bedel CVS albeu at mplayer.dev.hu
Mon Feb 25 12:13:37 CET 2002


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv14915

Modified Files:
	playtreeparser.c 
Log Message:
Small bugfix with getting playlist last line.
Thx Atmos


Index: playtreeparser.c
===================================================================
RCS file: /cvsroot/mplayer/main/playtreeparser.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- playtreeparser.c	21 Feb 2002 13:12:53 -0000	1.6
+++ playtreeparser.c	25 Feb 2002 11:13:34 -0000	1.7
@@ -73,7 +73,7 @@
     end = strchr(p->iter,'\n');
     if(!end) {
       if(p->stream->eof) {
-	end = p->buffer + p->buffer_end + 1;
+	end = p->buffer + p->buffer_end;
 	break;
       }
       resize = 1;
@@ -88,13 +88,13 @@
     return NULL;
   strncpy(p->line,p->iter,line_end - p->iter);
   p->line[line_end - p->iter] = '\0';
-  end++;
+  if(end != '\0')
+    end++;
 
   if(!p->keep) {
-    if(end[1] != '\0') {
-      p->buffer_end = strlen(end);
+    if(end[0] != '\0') {
+      p->buffer_end -= strlen(p->line)+1;
       memmove(p->buffer,end,p->buffer_end);
-      p->buffer[p->buffer_end] = '\0';
     } else
       p->buffer_end = 0;
     p->iter = p->buffer;




More information about the MPlayer-cvslog mailing list