summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--playtreeparser.c2
1 files changed, 1 insertions, 1 deletions
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));