phijor / SpecializeMii

Golden Pants for everyone!
GNU General Public License v3.0
27 stars 3 forks source link

Alignment fix #1

Closed fox8091 closed 7 years ago

fox8091 commented 7 years ago

I noticed that in mii.h, you mentioned compiler specific alignment on structs. Well, here's some things that may help:

__attribute__((aligned (8))); __attribute__ ((packed));

phijor commented 7 years ago

Thank you for the information.

Until now the compiler was rather compliant with my request to interpret binary data by overlaying structs, but if I'd ever run into trouble I might add these attributes. The code can't get any less portable anyway (which it is not intended to be).

Right now I'm statically checking for the correct offsets. If somehow, the compiler decides to randomly add padding/extra alignment, I'll know.

If you don't mind, I'll close this issue, but encourage you to suggest further enhancements :+1:

PS: Aren't you also developing corbenik CFW? This is a small world.

fox8091 commented 7 years ago

Feel free to close. And umm..sorta. I started work on a new patch. But yea, people get around. ;)