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 UserProfile crash if displayed User has rank 0 (unranked) in their 30-day history. #1674

Merged
merged 2 commits into from Dec 10, 2017

Conversation

FreezyLemon
Copy link
Contributor

Closes #1644 as it was caused by this.

Math.Log(x) returns -Infinity for x == 0, so when the graph tries to draw, it crashes (since some of its values are Infinity).
I fixed this by adding a special case where rank == 0 will be added to the rank graph as float.MinValue (i think this was intended, graph falls down and out of sight). I also changed it so "#0" would not be displayed in the graph.

FreezyLemon and others added 2 commits December 8, 2017 11:31
…me if that happens, also display "no rank" when hovering over history instead of "#0"
@peppy peppy merged commit e29b70f into ppy:master Dec 10, 2017
@FreezyLemon FreezyLemon deleted the fix-userprofile-unranked branch January 7, 2018 15:34
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.

UserProfile TestCase ("show flyte") crashes at isFinite check
2 participants