Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed binary representation typo in comment #88326

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

brennennen
Copy link
Contributor

Digging around in scene_multiplayer.h, I saw a couple comments that contradicted each other.

// Extract the `packet_type` from the LSB three bits:
uint8_t packet_type = p_packet[0] & CMD_MASK;
...
enum {
   CMD_MASK = 7, // 0x7 -> 0b00001111
};

The packet_type comment mentions "packet_type" is extracted from 3 bits, however the corresponding mask had a comment claiming 4 bits are set high. Looks like the CMD_MASK comment has a simple typo/off by one error, 0x7 is 0b0111 not 0b1111.

Feel free to ignore this if it is too nit-picky.

@akien-mga akien-mga merged commit 39fcef1 into godotengine:master Feb 15, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants