mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Replaced unsupported randomint()
This commit is contained in:
parent
5981ce73dc
commit
f93e71dada
3 changed files with 4 additions and 4 deletions
|
@ -96,7 +96,7 @@ module.exports.data2blob = function (data) {
|
|||
};
|
||||
|
||||
// Generate random numbers
|
||||
module.exports.random = function (max) { require('crypto').randomInt(0, max); };
|
||||
module.exports.random = function (max) { (require('crypto').randomBytes(4).readUInt32BE(0) % max); };
|
||||
|
||||
// Split a comma seperated string, ignoring commas in quotes.
|
||||
module.exports.quoteSplit = function (str) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue