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

hexen: Fix wrong save being deleted #1227

Merged
merged 2 commits into from
Sep 16, 2024
Merged

hexen: Fix wrong save being deleted #1227

merged 2 commits into from
Sep 16, 2024

Conversation

mikeday0
Copy link
Collaborator

I was prompted to look into this code again after I saw this post on DW. I found an issue where saving a savefile on pages 1, 2 or 3 can potentially delete the save in the corresponding slot on page 2, 4 or 6 respectively. Not sure if this has any relation to the issue reported by the user on DW, but this bug should certainly be fixed regardless.

If a save occurs on pages 1, 2 or 3, it has the potential to delete the
save in the corresponding slot on pages 2, 4 or 6.
@fabiangreffrath
Copy link
Owner

I was not involved in this code and while it looks fine to me, I still struggle to understand it entirely. Could you please elaborate a bit about the differences between the two functions and when the one is used and when the other? Thank you!

@mikeday0
Copy link
Collaborator Author

I agree that it's a little confusing. I took the opportunity to refactor and I think the intent of the code is clearer now.

Copy link
Owner

@fabiangreffrath fabiangreffrath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much cleaner now, thank you!

@mikeday0 mikeday0 merged commit 5a3e8ef into master Sep 16, 2024
6 checks passed
@mikeday0 mikeday0 deleted the hexensavefix branch September 16, 2024 22:20
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.

2 participants