GNU bug report logs -
#24020
[PATCH] Fix ‘[[:word:]]*\u2620’ failing to match ‘foo\u2620’
Previous Next
Reported by: Michal Nazarewicz <mina86 <at> mina86.com>
Date: Mon, 18 Jul 2016 14:06:01 UTC
Severity: normal
Tags: patch
Done: Michal Nazarewicz <mina86 <at> mina86.com>
Bug is archived. No further changes may be made.
Full log
Message #28 received at 24020 <at> debbugs.gnu.org (full text, mbox):
* src/regex.c (mutually_exclusive_p): Fix how whether character is
unibyte is tested when calling execute_charset function. This bug has
been introduced by [6dc6b00: Fix ‘[[:cc:]]*literal’ regex failing to
match ‘literal’] which dropped a call to IS_REAL_ASCII (c) macro.
Reinstitute it.
---
src/regex.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
FYI, I’ve just submitted this patch. The bug has been caught by
tests from dima_regex_embedded_modifiers branch which I’m working on
pulling into master branch so they will come in another commits.
diff --git a/src/regex.c b/src/regex.c
index 297bf71..1f2a1f08 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -4767,7 +4767,7 @@ mutually_exclusive_p (struct re_pattern_buffer *bufp, const_re_char *p1,
else if ((re_opcode_t) *p1 == charset
|| (re_opcode_t) *p1 == charset_not)
{
- if (!execute_charset (&p1, c, c, !multibyte))
+ if (!execute_charset (&p1, c, c, !multibyte || IS_REAL_ASCII (c)))
{
DEBUG_PRINT (" No match => fast loop.\n");
return 1;
--
2.8.0.rc3.226.g39d4020
This bug report was last modified 8 years and 296 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.