-
Notifications
You must be signed in to change notification settings - Fork 29
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
Division by zero if ply_count = 0 #30
Comments
Thank you. I handled a similar problem like this: 6caa559 I tend to find that clearer since it's more obviously there for error state handling. What do you think? |
Yeah, it seems like a nice solution, definitive clearer. |
Cool. I will get around to it. Feel free to send a PR in the mean time. By the way, did you observe this with zero-length PGN games or was it with 'normal' games? |
I think it happened with zero-length PGN games, but I'm not sure. |
I experienced the case that ply_count can be zero, resulting in two separate division by zero errors. My quick fix was just to ensure that division by zero is not possible (see 9a311a0 )
Other solutions might be better or preferred.
The text was updated successfully, but these errors were encountered: