Correct bug in plaintext parser : correctly remove trailling \r

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4518 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
albeu 2002-02-03 16:49:41 +00:00
parent 48ace4b1f7
commit 416e711c71
1 changed files with 1 additions and 1 deletions

View File

@ -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));