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

Fixed outstanding null dereferencing errors with -fanalyzer on modern #3165

Merged
merged 5 commits into from
Jul 31, 2023

Conversation

gruxor
Copy link

@gruxor gruxor commented Jul 21, 2023

Description

After this, all that stderr outputs are some palette issues with some item sprites that I'll PR later tonight probably.

There may still be additional fixes needed for other arguments that MGriffin was toying around with, but I think this is a good start and gets the core issues out of the way.

The change that looks big is the one in pokemon.c, but it's relatively simple - just separates the encrypted and unencrypted boxmon data behind an if/else instead of just playing fast and loose with the substruct pointers. The rest is relatively simple, but some of it revolves around some messy derefencing that we could clean up a bit better eventually. For the time being, some of these just check for null in the critical sections and output a warning via debug logging, which is at least safer than previously and keeps the analyzer off our backs.

I did some minimal testing, but let me know if you spot any issues.

Discord contact info

crater.

src/pokemon.c Outdated Show resolved Hide resolved
src/fieldmap.c Outdated Show resolved Hide resolved
@gruxor
Copy link
Author

gruxor commented Jul 22, 2023

@LOuroboros Fixed style issues as directed, should be good to go now.

@gruxor gruxor requested a review from LOuroboros July 24, 2023 13:55
@AsparagusEduardo AsparagusEduardo merged commit 5481681 into rh-hideout:upcoming Jul 31, 2023
@AsparagusEduardo AsparagusEduardo mentioned this pull request Sep 27, 2023
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.

4 participants