ams: revamp assertion system
This commit is contained in:
1 parent
9572fb2ce3
commit
40400aee1f
168 files changed
+1014
-696
No files matched your search
@@ -25,8 +25,8 @@ namespace ams::os::impl {
|
||||
/* Nintendo does not check the result of these invocations, but we will for safety. */
|
||||
/* Nintendo uses entropy values 0, 1 to seed the public TinyMT random, and values */
|
||||
/* 2, 3 to seed os::detail::RngManager's private TinyMT random. */
|
||||
R_ASSERT(svcGetInfo(reinterpret_cast<u64 *>(&seed[0]), InfoType_RandomEntropy, INVALID_HANDLE, 0));
|
||||
R_ASSERT(svcGetInfo(reinterpret_cast<u64 *>(&seed[2]), InfoType_RandomEntropy, INVALID_HANDLE, 1));
|
||||
R_ABORT_UNLESS(svcGetInfo(reinterpret_cast<u64 *>(&seed[0]), InfoType_RandomEntropy, INVALID_HANDLE, 0));
|
||||
R_ABORT_UNLESS(svcGetInfo(reinterpret_cast<u64 *>(&seed[2]), InfoType_RandomEntropy, INVALID_HANDLE, 1));
|
||||
|
||||
mt->Initialize(seed, util::size(seed));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user