# HG changeset patch # User albeu # Date 1014635614 0 # Node ID f3f94fb55398a3404c4833b393cbb6084b3a8b12 # Parent 7dfcfd1b9bf7d77ee224cea885260f72e2c64fa7 Small bugfix with getting playlist last line. Thx Atmos diff -r 7dfcfd1b9bf7 -r f3f94fb55398 playtreeparser.c --- a/playtreeparser.c Mon Feb 25 08:27:15 2002 +0000 +++ b/playtreeparser.c Mon Feb 25 11:13:34 2002 +0000 @@ -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;