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

Wrong alignment #68

Closed
MeiKatz opened this issue Jul 5, 2017 · 3 comments
Closed

Wrong alignment #68

MeiKatz opened this issue Jul 5, 2017 · 3 comments

Comments

@MeiKatz
Copy link

MeiKatz commented Jul 5, 2017

Shouldn't the alignment be 2 for INT16?
(https://github.com/mvidner/ruby-dbus/blob/master/lib/dbus/marshall.rb#L135-L140)

@mvidner
Copy link
Owner

mvidner commented Jul 11, 2017

Oh, you are right! Thanks!

Specification reference: Byte order and alignment

Each value in a block of bytes is aligned "naturally," for example 4-byte values are aligned to a 4-byte boundary, and 8-byte values to an 8-byte boundary.

Is there a public API that fails because of this, that I should quote in the fix?

@MeiKatz
Copy link
Author

MeiKatz commented Jul 11, 2017

I am not sure. I noticed it while restructuring your code base for my own needs. Maybe I will publish same in the near future and we can look what you can take for the original project.

@mvidner
Copy link
Owner

mvidner commented Jul 14, 2017

Thanks!

@mvidner mvidner closed this as completed Jul 14, 2017
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

No branches or pull requests

2 participants