summaryrefslogtreecommitdiff
path: root/apps/playlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/playlist.c')
-rw-r--r--apps/playlist.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 9ac05b5fe2..65ab494d18 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -46,9 +46,13 @@ char* playlist_next(int type)
46 fd = open(playlist.filename, O_RDONLY); 46 fd = open(playlist.filename, O_RDONLY);
47 if(-1 != fd) { 47 if(-1 != fd) {
48 lseek(fd, seek, SEEK_SET); 48 lseek(fd, seek, SEEK_SET);
49 max = read(fd, now_playing, sizeof(now_playing)); 49 max = read(fd, now_playing+1, sizeof(now_playing)-1);
50 close(fd); 50 close(fd);
51
52 /* Only absolute paths allowed */
53 now_playing[0] = '/';
51 54
55 /* Zero-terminate the file name */
52 seek=0; 56 seek=0;
53 while((now_playing[seek] != '\n') && 57 while((now_playing[seek] != '\n') &&
54 (now_playing[seek] != '\r') && 58 (now_playing[seek] != '\r') &&