Fix entity sorting

This commit is contained in:
Bohdan Horbeshko 2022-03-13 08:55:59 -04:00
parent 022a12ce31
commit 8aa5187e2e

View file

@ -59,8 +59,8 @@ func SortEntities(entities []*client.TextEntity) []*client.TextEntity {
copy(sortedEntities, entities)
sort.Slice(sortedEntities, func(i int, j int) bool {
entity1 := entities[i]
entity2 := entities[j]
entity1 := sortedEntities[i]
entity2 := sortedEntities[j]
if entity1.Offset < entity2.Offset {
return true
} else if entity1.Offset == entity2.Offset {