Skip to content

Commit

Permalink
Merge pull request #557 from Piku7/stable-sort-messages
Browse files Browse the repository at this point in the history
fix: stable sort messages
  • Loading branch information
markus-wa authored Jul 31, 2024
2 parents b26dacd + 38c2655 commit cc60829
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/demoinfocs/s2_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ func (p *parser) handleDemoPacket(pack *msgs2.CDemoPacket) {
ms = append(ms, pendingMessage{t, buf})
}

sort.Slice(ms, func(i, j int) bool {
sort.SliceStable(ms, func(i, j int) bool {
return ms[i].priority() < ms[j].priority() // TODO: taken from dotabuff/manta. do we really need this?
})

Expand Down

0 comments on commit cc60829

Please sign in to comment.