diff options
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | ChangeLog.pre-1-10 | 13 | ||||
-rw-r--r-- | ChangeLog.pre-1-4 | 13 | ||||
-rw-r--r-- | ChangeLog.pre-1-6 | 13 | ||||
-rw-r--r-- | ChangeLog.pre-1-8 | 13 | ||||
-rw-r--r-- | pango/pango-attributes.c | 14 | ||||
-rw-r--r-- | pango/pango-context.c | 3 |
7 files changed, 78 insertions, 4 deletions
@@ -1,3 +1,16 @@ +Thu Feb 5 16:30:46 2004 Owen Taylor <otaylor@redhat.com> + + Fix problem with empty markup tags (#128102, Christian Persch) + + * pango/pango-context.c (itemize_state_process_run): Assert + that the run is non-empty. + + * pango/pango-attributes.c (pango_attr_list_change): + Just ignore empty attributes. + + * pango/pango-attributes.c (pango_attr_iterator_next): + Skip empty attributes. + Thu Feb 5 15:28:44 2004 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.c (pango_layout_set_font_description): diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index 1aa1b56f..004ddbe9 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -1,3 +1,16 @@ +Thu Feb 5 16:30:46 2004 Owen Taylor <otaylor@redhat.com> + + Fix problem with empty markup tags (#128102, Christian Persch) + + * pango/pango-context.c (itemize_state_process_run): Assert + that the run is non-empty. + + * pango/pango-attributes.c (pango_attr_list_change): + Just ignore empty attributes. + + * pango/pango-attributes.c (pango_attr_iterator_next): + Skip empty attributes. + Thu Feb 5 15:28:44 2004 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.c (pango_layout_set_font_description): diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4 index 1aa1b56f..004ddbe9 100644 --- a/ChangeLog.pre-1-4 +++ b/ChangeLog.pre-1-4 @@ -1,3 +1,16 @@ +Thu Feb 5 16:30:46 2004 Owen Taylor <otaylor@redhat.com> + + Fix problem with empty markup tags (#128102, Christian Persch) + + * pango/pango-context.c (itemize_state_process_run): Assert + that the run is non-empty. + + * pango/pango-attributes.c (pango_attr_list_change): + Just ignore empty attributes. + + * pango/pango-attributes.c (pango_attr_iterator_next): + Skip empty attributes. + Thu Feb 5 15:28:44 2004 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.c (pango_layout_set_font_description): diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6 index 1aa1b56f..004ddbe9 100644 --- a/ChangeLog.pre-1-6 +++ b/ChangeLog.pre-1-6 @@ -1,3 +1,16 @@ +Thu Feb 5 16:30:46 2004 Owen Taylor <otaylor@redhat.com> + + Fix problem with empty markup tags (#128102, Christian Persch) + + * pango/pango-context.c (itemize_state_process_run): Assert + that the run is non-empty. + + * pango/pango-attributes.c (pango_attr_list_change): + Just ignore empty attributes. + + * pango/pango-attributes.c (pango_attr_iterator_next): + Skip empty attributes. + Thu Feb 5 15:28:44 2004 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.c (pango_layout_set_font_description): diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8 index 1aa1b56f..004ddbe9 100644 --- a/ChangeLog.pre-1-8 +++ b/ChangeLog.pre-1-8 @@ -1,3 +1,16 @@ +Thu Feb 5 16:30:46 2004 Owen Taylor <otaylor@redhat.com> + + Fix problem with empty markup tags (#128102, Christian Persch) + + * pango/pango-context.c (itemize_state_process_run): Assert + that the run is non-empty. + + * pango/pango-attributes.c (pango_attr_list_change): + Just ignore empty attributes. + + * pango/pango-attributes.c (pango_attr_iterator_next): + Skip empty attributes. + Thu Feb 5 15:28:44 2004 Owen Taylor <otaylor@redhat.com> * pango/pango-layout.c (pango_layout_set_font_description): diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c index 6dd070d7..2fb187c9 100644 --- a/pango/pango-attributes.c +++ b/pango/pango-attributes.c @@ -941,8 +941,11 @@ pango_attr_list_change (PangoAttrList *list, GSList *tmp_list, *prev, *link; gint start_index = attr->start_index; gint end_index = attr->end_index; - + g_return_if_fail (list != NULL); + + if (start_index == end_index) /* empty, nothing to do */ + return; tmp_list = list->attributes; prev = NULL; @@ -1274,9 +1277,12 @@ pango_attr_iterator_next (PangoAttrIterator *iterator) while (iterator->next_attribute && ((PangoAttribute *)iterator->next_attribute->data)->start_index == iterator->start_index) { - iterator->attribute_stack = g_list_prepend (iterator->attribute_stack, iterator->next_attribute->data); - iterator->end_index = MIN (iterator->end_index, ((PangoAttribute *)iterator->next_attribute->data)->end_index); - iterator->next_attribute = iterator->next_attribute->next; + if (((PangoAttribute *)iterator->next_attribute->data)->end_index > iterator->start_index) + { + iterator->attribute_stack = g_list_prepend (iterator->attribute_stack, iterator->next_attribute->data); + iterator->end_index = MIN (iterator->end_index, ((PangoAttribute *)iterator->next_attribute->data)->end_index); + iterator->next_attribute = iterator->next_attribute->next; + } } if (iterator->next_attribute) diff --git a/pango/pango-context.c b/pango/pango-context.c index 3bd7fd28..fd55a20c 100644 --- a/pango/pango-context.c +++ b/pango/pango-context.c @@ -941,6 +941,9 @@ itemize_state_process_run (ItemizeState *state) itemize_state_update_for_new_run (state); + /* We should never get an empty run */ + g_assert (state->run_end != state->run_start); + for (p = state->run_start; p < state->run_end; p = g_utf8_next_char (p)) |