From d7061f73b2ebff072e064971a5960749a7335bae Mon Sep 17 00:00:00 2001 From: Cas <6506529+ThaUnknown@users.noreply.github.com> Date: Wed, 7 Jun 2023 18:44:34 +0200 Subject: [PATCH] fix: bigInt (#472) --- lib/client/udp-tracker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/client/udp-tracker.js b/lib/client/udp-tracker.js index b3218bc..3a3ad42 100644 --- a/lib/client/udp-tracker.js +++ b/lib/client/udp-tracker.js @@ -323,7 +323,7 @@ function toUInt64 (n) { if (n > MAX_UINT || typeof n === 'string') { const buf = new Uint8Array(8) const view = new DataView(buf.buffer) - view.setBigUint64(0, n) + view.setBigUint64(0, BigInt(n)) return buf } return concat([new Uint8Array(4), common.toUInt32(n)])