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

Add casts to MEM_ macros #36

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add casts to MEM_ macros #36

wants to merge 1 commit into from

Conversation

AngheloAlf
Copy link
Collaborator

Added gpr casts to the arguments of the MEM_ macros to ensure the arithmetic is done as 64bits instead of something dumb because the caller passed 32bits unsigned values or similar. I also added ULL suffix to those big constants in the macro to ensure nothing will do something dumb.

I also changed save_write to use a size_t instead of uint32_t because that's the function that gave me problems in the first place

This PR was originally made in Zelda64Recomp/Zelda64Recomp#136

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.

1 participant