Fixed issue with incompatible buffer.toJSON for node 0.10 and 0.12
This commit is contained in:
parent
a3dee0695d
commit
8e6b0147b9
|
@ -91,8 +91,9 @@ BufferReader.prototype.readUInt64BEBN = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
BufferReader.prototype.readUInt64LEBN = function() {
|
BufferReader.prototype.readUInt64LEBN = function() {
|
||||||
var data = this.buf.slice(this.pos, this.pos + 8).toJSON().data;
|
var buf = this.buf.slice(this.pos, this.pos + 8);
|
||||||
var bn = new BN(data, 10, 'le');
|
var array = Array.prototype.slice.call(buf, 0);
|
||||||
|
var bn = new BN(array, 10, 'le');
|
||||||
this.pos = this.pos + 8;
|
this.pos = this.pos + 8;
|
||||||
return bn;
|
return bn;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue