summaryrefslogtreecommitdiff
path: root/pango/pango-attributes.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-07-09 23:07:34 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-07-09 23:07:34 -0400
commiteefde51444b8742428566a44cda58386b1e21baa (patch)
treec51a34842bfc87c5c682074a68b01c50b6eb1f3e /pango/pango-attributes.c
parent51bb38de1cc7b7cafe93376a315c8f646c07277b (diff)
downloadpango-eefde51444b8742428566a44cda58386b1e21baa.tar.gz
Remove an erroneous early exit
pango_attr_list_change was returning early in one case, missing to do some necessary cleanup of the list. Fixes: #564
Diffstat (limited to 'pango/pango-attributes.c')
-rw-r--r--pango/pango-attributes.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c
index 8b1d857b..fd0df205 100644
--- a/pango/pango-attributes.c
+++ b/pango/pango-attributes.c
@@ -1661,14 +1661,12 @@ pango_attr_list_change (PangoAttrList *list,
}
if (!inserted)
- {
- /* we didn't insert attr yet */
- pango_attr_list_insert (list, attr);
- return;
- }
+ /* we didn't insert attr yet */
+ pango_attr_list_insert (list, attr);
/* We now have the range inserted into the list one way or the
- * other. Fix up the remainder */
+ * other. Fix up the remainder
+ */
/* Attention: No i = 0 here. */
for (i = i + 1, p = list->attributes->len; i < p; i++)
{
@@ -1694,9 +1692,8 @@ pango_attr_list_change (PangoAttrList *list,
else
{
/* Trim the start of this attribute that it begins at the end
- * of the new attribute. This may involve moving
- * it in the list to maintain the required non-decreasing
- * order of start indices
+ * of the new attribute. This may involve moving it in the list
+ * to maintain the required non-decreasing order of start indices.
*/
int k, m;