Commit 075e7464 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Move some asserts to the right place. (#341661, #341665, Pascal Terjan)

2006-05-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbtree.c:
	* gtk/gtktextview.c: Move some asserts to the right
	place.  (#341661, #341665, Pascal Terjan)
parent 2fc15d31
2006-05-13 Matthias Clasen <mclasen@redhat.com>
* 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 <mclasen@redhat.com>
......
2006-05-13 Matthias Clasen <mclasen@redhat.com>
* 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 <mclasen@redhat.com>
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment