diff --git a/lib/net/common.js b/lib/net/common.js index 13b78c0f..c5342cde 100644 --- a/lib/net/common.js +++ b/lib/net/common.js @@ -167,8 +167,8 @@ exports.BAN_SCORE = 100; exports.nonce = function nonce() { const data = Buffer.allocUnsafe(8); - data.writeUInt32LE(Math.random() * 0x100000000, true, 0); - data.writeUInt32LE(Math.random() * 0x100000000, true, 4); + data.writeUInt32LE((Math.random() * 0x100000000) >>> 0, 0, true); + data.writeUInt32LE((Math.random() * 0x100000000) >>> 0, 4, true); return data; };