mirror of
https://github.com/AsgardEternal/SquadJS.git
synced 2024-09-28 17:34:25 -05:00
RCON ERR_BUFFER_OUT_OF_BOUNDS fix
This commit is contained in:
parent
fa8df8a0f1
commit
98c4278038
@ -114,7 +114,9 @@ export default class Rcon extends EventEmitter {
|
|||||||
|
|
||||||
const packets = [];
|
const packets = [];
|
||||||
|
|
||||||
while (this.incomingData.byteLength > 0) {
|
// we check that it's greater than 4 as if it's not then the length header is not fully present which breaks the
|
||||||
|
// rest of the code. We just need to wait for more data.
|
||||||
|
while (this.incomingData.byteLength >= 4) {
|
||||||
const size = this.incomingData.readInt32LE(0);
|
const size = this.incomingData.readInt32LE(0);
|
||||||
const packetSize = size + 4;
|
const packetSize = size + 4;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user