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

Fix floating point divide by zero in game::update_overmap_seen #36876

Merged
merged 1 commit into from
Jan 10, 2020

Conversation

hexagonrecursion
Copy link
Contributor

Summary

SUMMARY: Bugfixes "Fix floating point divide by zero in game::update_overmap_seen"

Purpose of change

Fixes #36809 - when is delta is zero calculating multiplier in update_overmap_seen was causing division by zero because max(0, 0) == 0

Describe the solution

Skip the case delta == point_zero.
It is already handled before the loop.

Describe alternatives you've considered

Testing

Additional context

@ifreund ifreund added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` labels Jan 10, 2020
@ZhilkinSerg ZhilkinSerg merged commit 9543261 into CleverRaven:master Jan 10, 2020
@hexagonrecursion hexagonrecursion deleted the patch-4 branch January 11, 2020 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Float divide by zero in game::update_overmap_seen
3 participants