diff --git a/ChangeLog b/ChangeLog index f70c95b87c..1a6c82ff1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,8 @@ 2006-05-13 Matthias Clasen - * gtk/gtktextview.c (gtk_text_view_allocate_children): Move - an assert to the right place. (#341661, Pascal Terjan) + * gtk/gtktextbtree.c: + * gtk/gtktextview.c: Move some asserts to the right + place. (#341661, #341665, Pascal Terjan) 2006-05-12 Matthias Clasen diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index f70c95b87c..1a6c82ff1d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,7 +1,8 @@ 2006-05-13 Matthias Clasen - * gtk/gtktextview.c (gtk_text_view_allocate_children): Move - an assert to the right place. (#341661, Pascal Terjan) + * gtk/gtktextbtree.c: + * gtk/gtktextview.c: Move some asserts to the right + place. (#341661, #341665, Pascal Terjan) 2006-05-12 Matthias Clasen diff --git a/gtk/gtktextbtree.c b/gtk/gtktextbtree.c index 1216d1834b..30b5d5cd85 100644 --- a/gtk/gtktextbtree.c +++ b/gtk/gtktextbtree.c @@ -3768,9 +3768,9 @@ _gtk_text_line_byte_to_segment (GtkTextLine *line, while (offset >= seg->byte_count) { - g_assert (seg != NULL); /* means an invalid byte index */ offset -= seg->byte_count; seg = seg->next; + g_assert (seg != NULL); /* means an invalid byte index */ } if (seg_offset) @@ -3794,9 +3794,9 @@ _gtk_text_line_char_to_segment (GtkTextLine *line, while (offset >= seg->char_count) { - g_assert (seg != NULL); /* means an invalid char index */ offset -= seg->char_count; seg = seg->next; + g_assert (seg != NULL); /* means an invalid char index */ } if (seg_offset) @@ -3820,9 +3820,9 @@ _gtk_text_line_byte_to_any_segment (GtkTextLine *line, while (offset > 0 && offset >= seg->byte_count) { - g_assert (seg != NULL); /* means an invalid byte index */ offset -= seg->byte_count; seg = seg->next; + g_assert (seg != NULL); /* means an invalid byte index */ } if (seg_offset) @@ -3846,9 +3846,9 @@ _gtk_text_line_char_to_any_segment (GtkTextLine *line, while (offset > 0 && offset >= seg->char_count) { - g_assert (seg != NULL); /* means an invalid byte index */ offset -= seg->char_count; seg = seg->next; + g_assert (seg != NULL); /* means an invalid byte index */ } if (seg_offset) @@ -3872,12 +3872,10 @@ _gtk_text_line_byte_to_char (GtkTextLine *line, while (byte_offset >= seg->byte_count) /* while (we need to go farther than the next segment) */ { - g_assert (seg != NULL); /* our byte_index was bogus if this happens */ - byte_offset -= seg->byte_count; char_offset += seg->char_count; - seg = seg->next; + g_assert (seg != NULL); /* our byte_index was bogus if this happens */ } g_assert (seg != NULL);