Fix MediaUtils.shuffle

Was ignoring the first element of the list.
This commit is contained in:
Christopher Eby 2011-08-27 16:08:35 -05:00
parent 09cf5a8930
commit 13f80aaca4

View File

@ -178,7 +178,7 @@ public class MediaUtils {
public static void shuffle(long[] list)
{
Random random = ContextApplication.getRandom();
for (int i = list.length; --i != 0; ) {
for (int i = list.length; --i != -1; ) {
int j = random.nextInt(i + 1);
long tmp = list[j];
list[j] = list[i];