mirror of https://github.com/mpv-player/mpv
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:
parent
48ace4b1f7
commit
416e711c71
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue