Skip to content

Comments

Packet data length bug fix in client.js#6

Open
g1xb17 wants to merge 3 commits intoericvaladas:masterfrom
g1xb17:patch-1
Open

Packet data length bug fix in client.js#6
g1xb17 wants to merge 3 commits intoericvaladas:masterfrom
g1xb17:patch-1

Conversation

@g1xb17
Copy link

@g1xb17 g1xb17 commented Aug 15, 2025

Either (buffer[1] << 8 + buffer[2]) + 3
or
The Commit made would fix this error

Some packets seem to be getting munged due to the fact that (buffer[1] << 8) | (buffer[2] + 3) can turn out a lot different than (buffer[1] << 8 + buffer[2] + 3) due to the bitwise or operation resulting in a different length because of overlapping bits.

g1xb17 added 3 commits August 15, 2025 15:18
Either `(buffer[1] << 8 + buffer[2]) + 3`
or
The Commit made would fix this error

Some packets seem to be getting munged due to the fact that 
(buffer[1] << 8) | (buffer[2] + 3) can turn out a lot different than (buffer[1] << 8 + buffer[2] + 3) due to the bitwise or operation resulting in a different length because of overlapping bits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant