From 389cb8ef5ac692b152b782515c16bcdaafabd7d4 Mon Sep 17 00:00:00 2001 From: Ilkka Ollakka Date: Wed, 28 Jul 2010 13:28:33 +0300 Subject: [PATCH] use unsigned rand-function in playlist thread --- src/playlist/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/playlist/thread.c b/src/playlist/thread.c index 194099631c..a87881c499 100644 --- a/src/playlist/thread.c +++ b/src/playlist/thread.c @@ -195,7 +195,7 @@ static void ResetCurrentlyPlaying( playlist_t *p_playlist, /* Shuffle the array */ for( unsigned j = p_playlist->current.i_size - 1; j > 0; j-- ) { - unsigned i = ((unsigned)vlc_mrand48()) % (j+1); /* between 0 and j */ + unsigned i = vlc_lrand48() % (j+1); /* between 0 and j */ playlist_item_t *p_tmp; /* swap the two items */ p_tmp = ARRAY_VAL(p_playlist->current, i); -- 2.39.5