diff options
-rw-r--r-- | src/lib/rng/system_rng/system_rng.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/rng/system_rng/system_rng.cpp b/src/lib/rng/system_rng/system_rng.cpp index 65d4dcb02..39ccf2f6b 100644 --- a/src/lib/rng/system_rng/system_rng.cpp +++ b/src/lib/rng/system_rng/system_rng.cpp @@ -41,7 +41,8 @@ class System_RNG_Impl final : public RandomNumberGenerator void randomize(uint8_t buf[], size_t len) override { - if(m_rtlgenrandom(buf, len) == false) + bool success = m_rtlgenrandom(buf, len) == TRUE; + if(!success) throw Exception("RtlGenRandom failed"); } |