summaryrefslogtreecommitdiffstats
path: root/apps/playlist.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2011-07-06 19:41:39 +0000
committerThomas Martitz <kugel@rockbox.org>2011-07-06 19:41:39 +0000
commit00dfcb8159c6b1e8a6c3717c1fa1eb8e1db9ff93 (patch)
treeebd90da4672c1396759974014c6da219866bd4e5 /apps/playlist.c
parent185fddbd66a1d494842c19c63ffdd919157a15e4 (diff)
downloadrockbox-00dfcb8159c6b1e8a6c3717c1fa1eb8e1db9ff93.tar.gz
rockbox-00dfcb8159c6b1e8a6c3717c1fa1eb8e1db9ff93.tar.bz2
rockbox-00dfcb8159c6b1e8a6c3717c1fa1eb8e1db9ff93.zip
Fix FS#12181 - Playlist re-shuffle does not work (r30122)
Dircache IDs can be 0, so to invalidate -1 must be used. Update the memset calls to reflect this. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30125 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playlist.c')
-rw-r--r--apps/playlist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index fc6b20307b..f645d662db 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 +1954,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)