From ede0524fe2b5d2977bad296eba7dcb1dba6629a9 Mon Sep 17 00:00:00 2001 From: binsee <5285894+binsee@users.noreply.github.com> Date: Wed, 7 Dec 2022 20:47:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20fix=20encode=20int64=20<4?= =?UTF-8?q?294967295?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/util/longbits.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/longbits.js b/src/util/longbits.js index 414a0feb7..91b7a5a85 100644 --- a/src/util/longbits.js +++ b/src/util/longbits.js @@ -20,13 +20,13 @@ function LongBits(lo, hi) { * Low bits. * @type {number} */ - this.lo = lo | 0; + this.lo = lo; /** * High bits. * @type {number} */ - this.hi = hi | 0; + this.hi = hi; } /** @@ -56,8 +56,8 @@ LongBits.fromBigInt = function fromNumber(value) { if (negative) { value = -value; } - var hi = Number(value >> 32n) | 0; - var lo = Number(value - ( BigInt(hi) << 32n ) ) | 0; + var hi = Number(value >> 32n); + var lo = Number(value - ( BigInt(hi) << 32n ) ); if (negative) { hi = ~hi >>> 0;