changeset 4517:7d24c9bd2ae5

Correct bug in plaintext parser : correctly remove trailling \r
author albeu
date Sun, 03 Feb 2002 16:49:41 +0000
parents d604c3db9a76
children 83128eed25f1
files playtreeparser.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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));