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

jump before object section in players parsing in fast header parser #102

Closed
wants to merge 1 commit into from

Conversation

Skazu
Copy link
Contributor

@Skazu Skazu commented Jul 27, 2023

I have found several matches in which errors occurred during the "objects" parsing, and subsequently the parser was unable to find the player-end marker.
Unfortunately, I could not solve the actual problem, but maybe you have an idea. I have checked in a recorded game and added a unit test.
However, in order to make the parsing more reliable, I have added a workaround that jumps back to the position before the objects in every case and searches for the player-end marker from there, which works in all cases, but is of course more unperformant, as a lot of data has to be loaded into the RAM.

@happyleavesaoc
Copy link
Owner

I think this is fixed in d56fc62

This rec (and some others) had \x0a as the wildcard byte in pattern match for the object start. That byte happens to be the newline \n which re does not match by default. So we didn't find the object start and the problems cascaded from there.

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.

None yet

2 participants