[gtksourceview] implregex: set initial offsets to -1



commit 57ed662807c434864b3ede3282bf650d6446131b
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jul 2 17:14:55 2021 -0700

    implregex: set initial offsets to -1

 gtksourceview/implregex.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gtksourceview/implregex.c b/gtksourceview/implregex.c
index fcbe618f..fbbfd1de 100644
--- a/gtksourceview/implregex.c
+++ b/gtksourceview/implregex.c
@@ -306,6 +306,8 @@ impl_match_info_new (ImplRegex        *regex,
        }
 
        match_info->offsets = pcre2_get_ovector_pointer (match_info->match_data);
+       match_info->offsets[0] = -1;
+       match_info->offsets[1] = -1;
 
        return match_info;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]