summaryrefslogtreecommitdiff
path: root/pango/pango-attributes.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-03-18 23:25:14 -0400
committerMatthias Clasen <mclasen@redhat.com>2022-03-18 23:28:17 -0400
commitb36001e880dc13ba4d782a4f2a4a58467284229d (patch)
tree459e238c79709b9b616148810120eb6af1d18ae1 /pango/pango-attributes.c
parent3b15fb81fe0078cb70fe5ff128d53e1cb146d3c7 (diff)
downloadpango-b36001e880dc13ba4d782a4f2a4a58467284229d.tar.gz
Maintain order in pango_attr_list_change
When PangoAttrList was changed to use an array, we lost the code that maintained non-decreasing order in pango_attr_list_change. Bring it back, and add a test for this.
Diffstat (limited to 'pango/pango-attributes.c')
-rw-r--r--pango/pango-attributes.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c
index 60d14706..4d7111fa 100644
--- a/pango/pango-attributes.c
+++ b/pango/pango-attributes.c
@@ -2184,6 +2184,9 @@ pango_attr_list_change (PangoAttrList *list,
if (tmp_attr2->start_index >= tmp_attr->start_index)
break;
+
+ g_ptr_array_index (list->attributes, k - 1) = tmp_attr2;
+ g_ptr_array_index (list->attributes, k) = tmp_attr;
}
}
}