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

fix: stable sort messages #557

Merged
merged 1 commit into from
Jul 31, 2024
Merged

Conversation

Piku7
Copy link
Contributor

@Piku7 Piku7 commented Jul 31, 2024

Fixes #555

All messages (SVC/UserMessages/GameEvents etc.) found in a demo packet are sorted based on their priority (ported from dotabuff/manta). The used sorting function sort.Slice() performs an unstable sort which might cause messages of the same priority to be reordered in arbitrary order. This PR changes sorting function to sort.SliceStable().

This unstable sort behaviour breaks POV demos while not affecting normal demos for some reason - someone can investigate further.

I tested it on broken POV demo that was provided with issue and 9 more that I had available - they all correctly parsed after this change.

@markus-wa markus-wa merged commit cc60829 into markus-wa:master Jul 31, 2024
5 checks passed
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.

Projectile data missing for POV demos ($1000 bounty)
2 participants