2005-05-25 duck

* Fixed PRNG bug (bugzilla #107)
This commit is contained in:
duck
2005-05-25 21:32:38 +00:00
committed by zzz
parent fef9d57483
commit c2696bba00
3 changed files with 10 additions and 5 deletions

View File

@ -34,7 +34,9 @@ public class PooledRandomSource extends RandomSource {
}
private final RandomSource pickPRNG() {
return _pool[(_nextPool++) % POOL_SIZE];
int i = _nextPool;
_nextPool = (_nextPool++) % POOL_SIZE;
return _pool[i];
}
/**
@ -138,4 +140,4 @@ public class PooledRandomSource extends RandomSource {
RandomSource prng = pickPRNG();
return prng.harvester();
}
}
}