From 8be68ab392e249ea2d6499a1b178d38d79566d5b Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 3 Nov 2016 16:35:31 -0700 Subject: [PATCH] chainentry: fix potential versionbits comparison failure. --- lib/chain/chainentry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chain/chainentry.js b/lib/chain/chainentry.js index edb3e23f..507e2917 100644 --- a/lib/chain/chainentry.js +++ b/lib/chain/chainentry.js @@ -371,7 +371,7 @@ ChainEntry.prototype.hasBit = function hasBit(deployment) { var bits = this.version & constants.versionbits.TOP_MASK; var topBits = constants.versionbits.TOP_BITS; var mask = 1 << deployment.bit; - return bits === topBits && (this.version & mask) !== 0; + return (bits >>> 0) === topBits && (this.version & mask) !== 0; }; ChainEntry.prototype.__defineGetter__('rhash', function() {