avoid using Array.apply(new Array(), buf) for compatability

This commit is contained in:
Ruben de Vries 2015-10-30 17:45:42 +01:00
parent 656665837c
commit 87a77e5b2f
1 changed files with 1 additions and 2 deletions

View File

@ -87,8 +87,7 @@ BufferWriter.prototype.writeUInt64BEBN = function(bn) {
BufferWriter.prototype.writeUInt64LEBN = function(bn) {
var buf = bn.toBuffer({size: 8});
var reversebuf = new Buffer(Array.apply(new Array(), buf).reverse());
this.write(reversebuf);
this.writeReverse(buf);
return this;
};