]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix ‘is multibyte’ test regex.c’s mutually_exclusive_p (bug#24020)
authorMichal Nazarewicz <mina86@mina86.com>
Wed, 27 Jul 2016 16:14:57 +0000 (18:14 +0200)
committerMichal Nazarewicz <mina86@mina86.com>
Wed, 27 Jul 2016 16:18:34 +0000 (18:18 +0200)
* 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

index 297bf7188484bb686722b392c12cf8ca548ae612..1f2a1f086de2b9e1777b2c802e63c2d3158c77f0 100644 (file)
@@ -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;