1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/apps/playlist.c b/apps/playlist.c
index fc6b203..ab140a1 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -1002,7 +1002,7 @@ static int sort_playlist(struct playlist_info* playlist, bool start_current,
     /** We need to re-check the song names from disk because qsort can't
      * sort two arrays at once :/
      * FIXME: Please implement a better way to do this. */
-    memset(playlist->filenames, 0, playlist->max_playlist_size * sizeof(int));
+    memset(playlist->filenames, 0xff, playlist->max_playlist_size * sizeof(int));
     queue_post(&playlist_queue, PLAYLIST_LOAD_POINTERS, 0);
 #endif
 
@@ -1954,7 +1956,7 @@ void playlist_init(void)
 #ifdef HAVE_DIRCACHE
     playlist->filenames = buffer_alloc(
         playlist->max_playlist_size * sizeof(int));
-    memset(playlist->filenames, 0,
+    memset(playlist->filenames, 0xff,
            playlist->max_playlist_size * sizeof(int));
     create_thread(playlist_thread, playlist_stack, sizeof(playlist_stack),
                   0, playlist_thread_name IF_PRIO(, PRIORITY_BACKGROUND)