From 416e711c711d976001b29b05e2f1f0c5d5152c0f Mon Sep 17 00:00:00 2001 From: albeu Date: Sun, 3 Feb 2002 16:49:41 +0000 Subject: [PATCH] Correct bug in plaintext parser : correctly remove trailling \r git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4518 b3059339-0415-0410-9bf9-f77b7e298cf2 --- playtreeparser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playtreeparser.c b/playtreeparser.c index 47918925c3..529adb4568 100644 --- a/playtreeparser.c +++ b/playtreeparser.c @@ -194,7 +194,7 @@ parse_textplain(play_tree_parser_t* p) { } 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));