mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 21:35:46 +00:00
mii/manager: Make use of unused lower bound in GetRandomValue()
Previously, the lower bound wasn't being used and zero was being used as the lower bound every time this function was called. This affects the outcome of some of the randomized entries a little bit, for example, the lower-bound for beard and mustache flags was supposed to be 1, not 0. Aside from these cases, the bug didn't affect anything else.
This commit is contained in:
parent
e0cc7f3b6e
commit
ab33132ccb
1 changed files with 1 additions and 1 deletions
|
@ -131,7 +131,7 @@ template <typename T>
|
||||||
T GetRandomValue(T min, T max) {
|
T GetRandomValue(T min, T max) {
|
||||||
std::random_device device;
|
std::random_device device;
|
||||||
std::mt19937 gen(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));
|
return static_cast<T>(distribution(gen));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue