summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-11-16 00:44:22 +0100
committerZach Hilman <zachhilman@gmail.com>2018-11-16 00:44:26 +0100
commit8cb2e7d881e1322a6132b3edff8a5ab65577a644 (patch)
treea90067e45aec7098d6609807c3c06c631551ce55 /src/core/hle
parentMerge pull request #1637 from FernandoS27/cache (diff)
downloadyuzu-8cb2e7d881e1322a6132b3edff8a5ab65577a644.tar
yuzu-8cb2e7d881e1322a6132b3edff8a5ab65577a644.tar.gz
yuzu-8cb2e7d881e1322a6132b3edff8a5ab65577a644.tar.bz2
yuzu-8cb2e7d881e1322a6132b3edff8a5ab65577a644.tar.lz
yuzu-8cb2e7d881e1322a6132b3edff8a5ab65577a644.tar.xz
yuzu-8cb2e7d881e1322a6132b3edff8a5ab65577a644.tar.zst
yuzu-8cb2e7d881e1322a6132b3edff8a5ab65577a644.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/spl/module.cpp3
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);