|
|
@ -378,9 +378,8 @@ TLSerialization.prototype.checkLength = function (needBytes) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
console.log('Increase buffer', this.offset, needBytes, this.maxLength); |
|
|
|
console.trace('Increase buffer', this.offset, needBytes, this.maxLength); |
|
|
|
console.trace(); |
|
|
|
this.maxLength = Math.ceil(Math.max(this.maxLength * 2, this.offset + needBytes + 16) / 4) * 4; |
|
|
|
this.maxLength = Math.max(this.maxLength * 2, this.offset + needBytes + 16); |
|
|
|
|
|
|
|
var previousBuffer = this.buffer, |
|
|
|
var previousBuffer = this.buffer, |
|
|
|
previousArray = new Int32Array(previousBuffer); |
|
|
|
previousArray = new Int32Array(previousBuffer); |
|
|
|
|
|
|
|
|
|
|
|