LaihoE / demoparser

Counter-Strike 2 replay parser for Python and JavaScript
MIT License
290 stars 30 forks source link

Giving wrong argument type to `player` parameter in `parse_event` causes panic. #174

Closed JanEricNitschke closed 3 months ago

JanEricNitschke commented 3 months ago

Giving the wrong argument type to any of the kwargs causes a panic instead of raising a python error.

See: https://github.com/LaihoE/demoparser/blob/main/src/python/src/lib.rs#L949

LaihoE commented 3 months ago

Yeah the python binding code could use some cleaning up 😄. Do you want to give it a try? Should be quite simple (feel free to modify the entire function)

JanEricNitschke commented 3 months ago

Fixed by https://github.com/LaihoE/demoparser/pull/180