Merge pull request #13 from rubensayshi/uint64LEBN-buffer-reverse
avoid using Array.apply(new Array(), buf) for compatability
This commit is contained in:
commit
21b52a054c
|
@ -87,8 +87,7 @@ BufferWriter.prototype.writeUInt64BEBN = function(bn) {
|
||||||
|
|
||||||
BufferWriter.prototype.writeUInt64LEBN = function(bn) {
|
BufferWriter.prototype.writeUInt64LEBN = function(bn) {
|
||||||
var buf = bn.toBuffer({size: 8});
|
var buf = bn.toBuffer({size: 8});
|
||||||
var reversebuf = new Buffer(Array.apply(new Array(), buf).reverse());
|
this.writeReverse(buf);
|
||||||
this.write(reversebuf);
|
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue