mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
Merge pull request #90 from shannah/issue_88
Fix for issue #88. Collections.shuffle bug.
This commit is contained in:
commit
e3775890fa
|
@ -291,7 +291,7 @@ public class TCollections extends TObject {
|
|||
|
||||
private static void shuffleRandomAccess(TList<?> list, TRandom rnd) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user