Browse Source
Merge pull request #4801 from lioncash/missing-bound
mii/manager: Make use of unused lower bound in GetRandomValue()
pull/15/merge
bunnei
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
src/core/hle/service/mii/manager.cpp
|
|
|
@ -131,7 +131,7 @@ template <typename T> |
|
|
|
T GetRandomValue(T min, T max) { |
|
|
|
std::random_device device; |
|
|
|
std::mt19937 gen(device()); |
|
|
|
std::uniform_int_distribution<u64> distribution(0, static_cast<u64>(max)); |
|
|
|
std::uniform_int_distribution<u64> distribution(static_cast<u64>(min), static_cast<u64>(max)); |
|
|
|
return static_cast<T>(distribution(gen)); |
|
|
|
} |
|
|
|
|
|
|
|
|