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

Assert in MSG_WriteDeltaEntity() being wrong cause of bool change #45

Open
Yberion opened this issue Apr 19, 2020 · 0 comments
Open

Assert in MSG_WriteDeltaEntity() being wrong cause of bool change #45

Yberion opened this issue Apr 19, 2020 · 0 comments
Assignees
Labels
M: networking module: networking (meta) P: medium priority: medium S: open status: open T: bug type: bug

Comments

@Yberion
Copy link
Contributor

Yberion commented Apr 19, 2020

Since we now use bool instead of qboolean, the assert here is wrong :

https://github.com/CleanJK/CleanJK/blob/master/codemp/qcommon/msg.cpp#L1492

It's because they assumed that all fields were 4 bytes and aligned properly as in 32bits.

But here sizeof(bool) != 4

We should find another way to count the number of fields. The code remains valid since they use offsetof on each fields when checking/sending the state.

@Yberion Yberion added T: bug type: bug M: networking module: networking (meta) P: medium priority: medium S: open status: open labels Apr 19, 2020
@Yberion Yberion self-assigned this Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M: networking module: networking (meta) P: medium priority: medium S: open status: open T: bug type: bug
Projects
None yet
Development

No branches or pull requests

1 participant