Skip to content

Commit cc60829

Browse files
authored
Merge pull request #557 from Piku7/stable-sort-messages
fix: stable sort messages
2 parents b26dacd + 38c2655 commit cc60829

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/demoinfocs/s2_commands.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ func (p *parser) handleDemoPacket(pack *msgs2.CDemoPacket) {
320320
ms = append(ms, pendingMessage{t, buf})
321321
}
322322

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

0 commit comments

Comments
 (0)