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

prevent divide by zero if user has reset softcore but not hardcore #1182

Merged
merged 2 commits into from
Oct 7, 2022

Conversation

Jamiras
Copy link
Member

@Jamiras Jamiras commented Oct 3, 2022

fixes Division by zero at /srv/web/releases/2022-10-01T015903-2.0.1-dc8bb24/lib/render/game.php:260

If a user has somehow reset all of their softcore unlocks for a set, but still has hardcore unlocks, then the adjustment to calculate how many softcore unlocks the user has made generates a negative value that cancels out the hardcore count, resulting in a divide by zero error when attempting to render the yellow+blue progress bar.

@luchaos luchaos merged commit 7952fe5 into RetroAchievements:master Oct 7, 2022
@Jamiras Jamiras deleted the div_zero_mastery branch October 8, 2022 20:40
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