# HG changeset patch # User albeu # Date 1012754981 0 # Node ID 7d24c9bd2ae53a3d0a015bf184e8c78f10f54351 # Parent d604c3db9a7624bccb81ca24b37d029d34fd9d5c Correct bug in plaintext parser : correctly remove trailling \r diff -r d604c3db9a76 -r 7d24c9bd2ae5 playtreeparser.c --- a/playtreeparser.c Sun Feb 03 16:13:05 2002 +0000 +++ b/playtreeparser.c Sun Feb 03 16:49:41 2002 +0000 @@ -194,7 +194,7 @@ } else { - if(r > 0 && p->buffer[r-1] == '\r') r--; + if(*(end-1) == '\r') end--; file = (char*)malloc((end-(&p->buffer[r])+1)*sizeof(char)); if(file == NULL) { mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate %d bytes of memory\n",p->buffer_size*sizeof(char));