Skip to content

Fixed off by one error in packet size, and datatype of keep_alive - #28

Merged
nickelpro merged 1 commit into
SpockBotMC:masterfrom
gamingrobot:keepalive-fix
Jan 2, 2015
Merged

Fixed off by one error in packet size, and datatype of keep_alive#28
nickelpro merged 1 commit into
SpockBotMC:masterfrom
gamingrobot:keepalive-fix

Conversation

@gamingrobot

Copy link
Copy Markdown
Member

Keep Alive packed send from the server
b'\x06\x00\x00\xc5\xf6\xf3\t'
Keep Alive packet sent back to server
b'\x05\x00\x00\xc5\xf6\xf3\t'

This would cause the minecraft server to drop the client because it failed to decode the packet

@nickelpro

Copy link
Copy Markdown
Member

Ah, they changed keep_alives on me

Why are you adding one to the uncompressed_len?

@nickelpro

Copy link
Copy Markdown
Member

Ok So I don't understand why it's there but it fixes the bug, sooooo in it goes

nickelpro pushed a commit that referenced this pull request Jan 2, 2015
Fixed off by one error in packet size, and datatype of keep_alive
@nickelpro
nickelpro merged commit f6ddd46 into SpockBotMC:master Jan 2, 2015
@nickelpro

Copy link
Copy Markdown
Member

Ah, figured it out. It's only for uncompressed packets: 1166fc5

I was forgetting to add the length of the 0 value data_length field

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.

2 participants