Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions lib/packets/packet.js
Original file line number Diff line number Diff line change
Expand Up @@ -832,11 +832,10 @@
if (n === null) {
return this.writeInt8(0xfb);
}
// TODO: check that n is out of int precision
this.writeInt8(0xfe);
this.buffer.writeUInt32LE(n, this.offset);
this.buffer.writeUInt32LE(n & 0xffffffff, this.offset);

Check warning on line 836 in lib/packets/packet.js

View check run for this annotation

Codecov / codecov/patch

lib/packets/packet.js#L836

Added line #L836 was not covered by tests
this.offset += 4;
this.buffer.writeUInt32LE(n >> 32, this.offset);
this.buffer.writeUInt32LE(Math.floor(n / 0x100000000), this.offset);

Check warning on line 838 in lib/packets/packet.js

View check run for this annotation

Codecov / codecov/patch

lib/packets/packet.js#L838

Added line #L838 was not covered by tests
this.offset += 4;
return this.offset;
}
Expand Down
Loading