mirror of
https://github.com/google/leveldb.git
synced 2025-02-26 08:50:09 +08:00
Fix Random::Next() Never Returns 0
Issue #: 208 Name on CLA: Phil Borel
This commit is contained in:
parent
3080a45b62
commit
aa2b55d88d
@ -41,7 +41,7 @@ class Random {
|
||||
if (seed_ > M) {
|
||||
seed_ -= M;
|
||||
}
|
||||
return seed_;
|
||||
return seed_ - 1;
|
||||
}
|
||||
// Returns a uniformly distributed value in the range [0..n-1]
|
||||
// REQUIRES: n > 0
|
||||
|
Loading…
Reference in New Issue
Block a user