-
Notifications
You must be signed in to change notification settings - Fork 41
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
avoid unaligned loads / stores #93
base: master
Are you sure you want to change the base?
Conversation
Will review soon when I get a chance. |
Re-opening after fixing accidental screw-up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems about as fine as it can be without a much larger overhaul.
UINT nbo = pmsh->songlen >> 8; | ||
UINT nbo = READ_BE16(pmsh + offsetof(MMD0SONGHEADER,songlen)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't a change request, but I felt like pointing out the old version here broke my brain a little bit :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. There are some other similar hacks there, all changed to use READ_BE??
Am I correct in thinking that this PR is meant to fix big endian compatibility as well? Also, there's a Windows CE workaround in |
Other loaders will need similar changes, but yes it will be a much larger patch |
Yes (even though the comments in there say that it is big-endian-fixed)
Looks like it |
Can we get this, #88, and #92 in please for portability? |
This patch fully replaces #88 I think, but otherwise yes, these ought to be merged ASAP.
I think only @Konstanty can merge. |
These are patches for libmodplug that fix various UB issues. They come from these PRs to the upstream repository: 1. Konstanty/libmodplug#92 2. Konstanty/libmodplug#93 The upstream maintainer has not merged any PRs in over a year. Fixes OpenDingux#105.
These are patches for libmodplug that fix various UB issues. They come from these PRs to the upstream repository: 1. Konstanty/libmodplug#92 2. Konstanty/libmodplug#93 The upstream maintainer has not merged any PRs in over a year. Fixes OpenDingux#105. Signed-off-by: Gleb Mazovetskiy <[email protected]>
These are patches for libmodplug that fix various UB issues. They come from these PRs to the upstream repository: 1. Konstanty/libmodplug#92 2. Konstanty/libmodplug#93 The upstream maintainer has not merged any PRs in over a year. Fixes #105. Signed-off-by: Gleb Mazovetskiy <[email protected]>
Closes #88
@ccawley2011, @AliceLR, @sagamusix: Please review.