diff options
Diffstat (limited to 'backend/RNG.cpp')
-rw-r--r-- | backend/RNG.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/backend/RNG.cpp b/backend/RNG.cpp index bc3e57b..2d7895b 100644 --- a/backend/RNG.cpp +++ b/backend/RNG.cpp @@ -14,7 +14,8 @@ int RNG::rand_int(const int upper) { return this->rand_int(0, upper); } int RNG::rand_int(const int lower, const int upper) { - uniform_int_distribution<int> random_dist(lower, upper); + // NOTE: random_dist's upper limit is inclusive + uniform_int_distribution<int> random_dist(lower, upper - 1); return random_dist(rng); } |