ECPair: enforce <= 0, not just ===

This commit is contained in:
Daniel Cousens 2015-09-09 00:35:54 +10:00
parent a72e608898
commit a5196dedcb

View file

@ -89,7 +89,7 @@ ECPair.makeRandom = function (options) {
typeforce(types.Buffer256bit, buffer)
d = BigInteger.fromBuffer(buffer)
} while (d.signum() === 0 || d.compareTo(secp256k1.n) >= 0)
} while (d.signum() <= 0 || d.compareTo(secp256k1.n) >= 0)
return new ECPair(d, null, options)
}