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

Deltadore X3D - Fixed wrong struct size #3180

Merged
merged 2 commits into from
Feb 3, 2025

Conversation

mr-sven
Copy link
Contributor

@mr-sven mr-sven commented Feb 3, 2025

Raw message data was missing 2 bytes because of missing packed attribute of struct.

@zuckschwerdt
Copy link
Collaborator

I don't see deltadore_x3d_message_payload used as cast. And raw_msg uses the frame bytes, right? What did I miss?
Packing is something we really try to avoid as there are pitfalls and it's not fully portable.

@mr-sven
Copy link
Contributor Author

mr-sven commented Feb 3, 2025

ahm, I used it for size calculation in deltadore_x3d_parse_message_payload but I can change it to return a fixed number.
An other question, I thought about declare the deltadore_x3d_read_le_u16 functions as inline, is that ok for you?

@zuckschwerdt
Copy link
Collaborator

Inline is okay, but not needed. It's only a hint to the compiler and with static functions compiler optimizations should inline already. You can check with e.g. objdump -t on the .o.

@mr-sven
Copy link
Contributor Author

mr-sven commented Feb 3, 2025

Changed to return a fixed value

@zuckschwerdt zuckschwerdt merged commit cccf79d into merbanan:master Feb 3, 2025
9 checks passed
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