Skip to content

Commit d7061f7

Browse files
authored
fix: bigInt (webtorrent#472)
1 parent a6bb919 commit d7061f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/client/udp-tracker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ function toUInt64 (n) {
323323
if (n > MAX_UINT || typeof n === 'string') {
324324
const buf = new Uint8Array(8)
325325
const view = new DataView(buf.buffer)
326-
view.setBigUint64(0, n)
326+
view.setBigUint64(0, BigInt(n))
327327
return buf
328328
}
329329
return concat([new Uint8Array(4), common.toUInt32(n)])

0 commit comments

Comments
 (0)