Open NajdorfB opened 5 years ago
Thank you. I handled a similar problem like this: 6caa559ec168e47c86ee433eebef3e6586153039
I tend to find that clearer since it's more obviously there for error state handling. What do you think?
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 9a311a05300f1454e15169745105faa1537e71ab )
Other solutions might be better or preferred.