Browse Source

lib/hdkey: replace an constant number with the constant var

master
JP Richardson 11 years ago
parent
commit
848e3fe9a4
  1. 2
      lib/hdkey.js

2
lib/hdkey.js

@ -86,7 +86,7 @@ HDKey.prototype.derive = function(path) {
} }
var usePrivate = (c.length > 1) && (c[c.length-1] == '\'') var usePrivate = (c.length > 1) && (c[c.length-1] == '\'')
var childIndex = parseInt(usePrivate ? c.slice(0, c.length - 1) : c) & 0x7fffffff var childIndex = parseInt(usePrivate ? c.slice(0, c.length - 1) : c) & (HARDENED_OFFSET - 1)
if (usePrivate) if (usePrivate)
childIndex += HARDENED_OFFSET childIndex += HARDENED_OFFSET

Loading…
Cancel
Save