0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00

fix "last file is always played last" bug.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13885 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2004-11-05 22:45:16 +00:00
parent 7bb5364bf7
commit 1e9749979b

View File

@ -525,7 +525,7 @@ play_tree_rnd_step(play_tree_t* pt) {
if(!count) return NULL;
r = (int)((count-1.0) * rand() / RAND_MAX);
r = (int)((float)(count) * rand() / (RAND_MAX + 1.0));
for(i = head ; i ; i=i->next) {
if(!(i->flags & PLAY_TREE_RND_PLAYED)) r--;