diff --git a/gtk/gtkeditable.c b/gtk/gtkeditable.c index 0312d5fae9..41fb0b729c 100644 --- a/gtk/gtkeditable.c +++ b/gtk/gtkeditable.c @@ -517,7 +517,7 @@ gtk_editable_delete_text (GtkEditable *editable, { g_return_if_fail (GTK_IS_EDITABLE (editable)); g_return_if_fail (start_pos >= 0); - g_return_if_fail (end_pos == -1 || end_pos > start_pos); + g_return_if_fail (end_pos == -1 || end_pos >= start_pos); GTK_EDITABLE_GET_IFACE (editable)->do_delete_text (editable, start_pos, end_pos); } @@ -552,7 +552,7 @@ gtk_editable_get_chars (GtkEditable *editable, g_return_val_if_fail (GTK_IS_EDITABLE (editable), NULL); g_return_val_if_fail (start_pos >= 0, NULL); - g_return_val_if_fail (end_pos == -1 || end_pos > start_pos, NULL); + g_return_val_if_fail (end_pos == -1 || end_pos >= start_pos, NULL); text = GTK_EDITABLE_GET_IFACE (editable)->get_text (editable); length = g_utf8_strlen (text, -1);