diff options
-rw-r--r-- | src/core/hle/service/spl/module.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hle/service/spl/module.cpp b/src/core/hle/service/spl/module.cpp index 69c260408..b2de2a818 100644 --- a/src/core/hle/service/spl/module.cpp +++ b/src/core/hle/service/spl/module.cpp @@ -28,8 +28,9 @@ void Module::Interface::GetRandomBytes(Kernel::HLERequestContext& ctx) { std::size_t size = ctx.GetWriteBufferSize(); + std::uniform_int_distribution<u16> distribution(0, std::numeric_limits<u8>::max()); std::vector<u8> data(size); - std::generate(data.begin(), data.end(), rng); + std::generate(data.begin(), data.end(), [&] { return static_cast<u8>(distribution(rng)); }); ctx.WriteBuffer(data); |