[gtksourceview] regex: Fix incorrect bitflag operations
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] regex: Fix incorrect bitflag operations
- Date: Thu, 29 Sep 2022 20:45:50 +0000 (UTC)
commit 8d779e1bbf75b0ea06643048d12c0086db9659cd
Author: Moody <mooodyhunter outlook com>
Date: Thu Sep 29 15:56:17 2022 +0000
regex: Fix incorrect bitflag operations
gtksourceview/implregex.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/gtksourceview/implregex.c b/gtksourceview/implregex.c
index b8eb8137..47f00646 100644
--- a/gtksourceview/implregex.c
+++ b/gtksourceview/implregex.c
@@ -99,12 +99,18 @@ translate_compile_flags (GRegexCompileFlags flags)
if ((flags & G_REGEX_RAW) == 0)
{
ret |= (PCRE2_UTF | PCRE2_NO_UTF_CHECK);
+ }
+ else
+ {
flags &= ~G_REGEX_RAW;
}
- if (~flags & G_REGEX_BSR_ANYCRLF)
+ if ((flags & G_REGEX_BSR_ANYCRLF) == 0)
{
ret |= PCRE2_BSR_UNICODE;
+ }
+ else
+ {
flags &= ~G_REGEX_BSR_ANYCRLF;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]