mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Fix for issue 88. Collections.shuffle bug.
This commit is contained in:
parent
457bd16b11
commit
7d6d777906
|
@ -291,7 +291,7 @@ public class TCollections extends TObject {
|
||||||
|
|
||||||
private static void shuffleRandomAccess(TList<?> list, TRandom rnd) {
|
private static void shuffleRandomAccess(TList<?> list, TRandom rnd) {
|
||||||
for (int i = list.size() - 1; i > 0; --i) {
|
for (int i = list.size() - 1; i > 0; --i) {
|
||||||
int j = rnd.next(i + 1);
|
int j = rnd.nextInt(i + 1);
|
||||||
swap(list, i, j);
|
swap(list, i, j);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user