From 13f80aaca4b50ffcc2739fc70908cbfa78fd5d29 Mon Sep 17 00:00:00 2001 From: Christopher Eby Date: Sat, 27 Aug 2011 16:08:35 -0500 Subject: [PATCH] Fix MediaUtils.shuffle Was ignoring the first element of the list. --- src/org/kreed/vanilla/MediaUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/kreed/vanilla/MediaUtils.java b/src/org/kreed/vanilla/MediaUtils.java index ee28a49e..7c5afd50 100644 --- a/src/org/kreed/vanilla/MediaUtils.java +++ b/src/org/kreed/vanilla/MediaUtils.java @@ -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];