From c1577f3448d3d9a691efc252edbf46c7b6756cb5 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 17 Oct 2020 09:46:11 -0400 Subject: [PATCH] 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. --- src/core/hle/service/mii/manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/hle/service/mii/manager.cpp b/src/core/hle/service/mii/manager.cpp index 8e433eb41..d73b90015 100644 --- a/src/core/hle/service/mii/manager.cpp +++ b/src/core/hle/service/mii/manager.cpp @@ -131,7 +131,7 @@ template T GetRandomValue(T min, T max) { std::random_device device; std::mt19937 gen(device()); - std::uniform_int_distribution distribution(0, static_cast(max)); + std::uniform_int_distribution distribution(static_cast(min), static_cast(max)); return static_cast(distribution(gen)); }