diff options
Diffstat (limited to 'src/mongo/shell/shell_utils.cpp')
-rw-r--r-- | src/mongo/shell/shell_utils.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/shell/shell_utils.cpp b/src/mongo/shell/shell_utils.cpp index 992f658f5f5..faa4e88c35d 100644 --- a/src/mongo/shell/shell_utils.cpp +++ b/src/mongo/shell/shell_utils.cpp @@ -185,7 +185,7 @@ BSONObj JSSrand(const BSONObj& a, void* data) { // grab the least significant bits of either the supplied argument or // a random number from SecureRandom. if (a.nFields() == 1 && a.firstElement().isNumber()) - seed = static_cast<unsigned int>(a.firstElement().numberLong()); + seed = static_cast<unsigned int>(a.firstElement().safeNumberLong()); else { std::unique_ptr<SecureRandom> rand(SecureRandom::create()); seed = static_cast<unsigned int>(rand->nextInt64()); |