mirror of
https://github.com/konsoletyper/teavm.git
synced 2025-01-06 10:15:18 +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