[pango/attr-list-change-fix: 1/2] Remove an erroneous early exit
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/attr-list-change-fix: 1/2] Remove an erroneous early exit
- Date: Sat, 10 Jul 2021 03:10:05 +0000 (UTC)
commit eefde51444b8742428566a44cda58386b1e21baa
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jul 9 23:07:34 2021 -0400
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
pango/pango-attributes.c | 15 ++++++---------
1 file 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]