Skip to content

fix: division by zero error on instant leave replays#3

Merged
NumberPigeon merged 2 commits into
NumberPigeon:mainfrom
manuelseeger:main
Dec 31, 2024
Merged

fix: division by zero error on instant leave replays#3
NumberPigeon merged 2 commits into
NumberPigeon:mainfrom
manuelseeger:main

Conversation

@manuelseeger

Copy link
Copy Markdown
Contributor

See ggtracker/sc2reader#198

On an instant leave there can be a division by zero.

If a player does an action and leaves the game just when the game clocks from second 0 to second 1 there can be a condition where apm > 0 but second == 0, resulting in a division by zero.

@NumberPigeon NumberPigeon left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

LGTM, nice done mate

@NumberPigeon NumberPigeon merged commit e8edc67 into NumberPigeon:main Dec 31, 2024
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