RangeError: Maximum call stack size exceeded
Opened this issue · 1 comments
akahmet commented
RangeError: Maximum call stack size exceeded
at BinaryPack.Unpacker.readInt64 (/usr/src/server/node_modules/binarypack/lib/binarypack.js:115:51)
File need an update as stated below.
BinaryPack.Unpacker.prototype.readUInt64 = function(){
var bytes = this.cursor.slice(8).buffer;
return ((((((bytes[0] * 256 +
bytes[1]) * 256 +
bytes[2]) * 256 +
bytes[3]) * 256 +
bytes[4]) * 256 +
bytes[5]) * 256 +
bytes[6]) * 256 +
bytes[7];
}
BinaryPack.Unpacker.prototype.readInt64 = function(){
var uint64 = this.readUInt64();
console.log(uint64, 'log');
return (uint64 < Math.pow(2, 63) ) ? uint64 : uint64 - Math.pow(2, 64);
}
lpinca commented
This module relies on https://github.com/binaryjs/node-binarypack which is no longer maintained. I would use https://github.com/primus/primus-msgpack instead. The added benefit is that primus-msgpack is faster.