Fixed global scope leaks in Base58.

This commit is contained in:
Stefan Thomas 2012-01-11 10:42:39 +01:00
parent 09e8c6e184
commit 6e44bdf229
2 changed files with 3 additions and 4 deletions

View file

@ -29,8 +29,7 @@
} else break;
}
s = chars.join('');
return s;
return chars.join('');
},
/**
@ -42,7 +41,7 @@
* Ported to JavaScript by Stefan Thomas.
*/
decode: function (input) {
bi = BigInteger.valueOf(0);
var bi = BigInteger.valueOf(0);
var leadingZerosNum = 0;
for (var i = input.length - 1; i >= 0; i--) {
var alphaIndex = B58.alphabet.indexOf(input[i]);

View file

@ -143,7 +143,7 @@
// template matching params
OP_PUBKEYHASH : 253,
OP_PUBKEY : 254,
OP_INVALIDOPCODE : 255,
OP_INVALIDOPCODE : 255
};
Opcode.reverseMap = [];