chainentry: fix potential versionbits comparison failure.

This commit is contained in:
Christopher Jeffrey 2016-11-03 16:35:31 -07:00
parent 407f416f22
commit 8be68ab392
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -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() {