8bitbubsy / ft2-clone

Fasttracker 2 clone for Windows/macOS/Linux
https://16-bits.org
BSD 3-Clause "New" or "Revised" License
712 stars 48 forks source link

pack tonTyp struct #18

Closed ftrvxmtrx closed 3 years ago

ftrvxmtrx commented 3 years ago

Code throughout seem to expect sizeof(tonTyp) to be exactly 5 bytes, which is the case if gcc is used, but, while porting to Plan 9, it was found that sizeof is 8 bytes with some compilers instead, resulting in either crashes on loading a module, or incorrect playback.

8bitbubsy commented 3 years ago

Interesting, I thought this would be safe because it consists of bytes only. I made my own commit because I wanted to add some comments and rearrange some stuff in ft2_replayer.h Thanks for pointing out this issue!