From a9af6f4e8631bff8394b042f87dc6d161365b922 Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Fri, 11 Nov 2005 20:10:47 +0000 Subject: [PATCH] Don't die on empty matches --- moo/mooedit/mooeditsearch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moo/mooedit/mooeditsearch.c b/moo/mooedit/mooeditsearch.c index 7e1df039..d7cf87b8 100644 --- a/moo/mooedit/mooeditsearch.c +++ b/moo/mooedit/mooeditsearch.c @@ -321,7 +321,7 @@ static gboolean moo_text_match_regex_forward (const GtkTextIter *start, } g_free (text); - g_assert (gtk_text_iter_compare (match_start, match_end) == -1); + g_assert (gtk_text_iter_compare (match_start, match_end) <= 0); return TRUE; } @@ -439,7 +439,7 @@ static gboolean moo_text_match_regex_backward (const GtkTextIter *start, } g_free (text); - g_assert (gtk_text_iter_compare (match_start, match_end) == 1); + g_assert (gtk_text_iter_compare (match_start, match_end) >= 0); return TRUE; }