regcomp.c: Use more precise ANYOF flag
authorKarl Williamson <public@khwilliamson.com>
Fri, 25 Feb 2011 18:42:02 +0000 (11:42 -0700)
committerKarl Williamson <public@khwilliamson.com>
Sat, 26 Feb 2011 04:06:09 +0000 (21:06 -0700)
As the comment above the changed line says, \p doesn't have to match only
utf8, but it sets the flag that is two bits, meaning UTF8.  Set just the
one flag.

regcomp.c

index b4cdbfe..b88624b 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -9467,7 +9467,7 @@ parseit:
 
                /* The \p could match something in the Latin1 range, hence
                 * something that isn't utf8 */
-               ANYOF_FLAGS(ret) |= ANYOF_NONBITMAP;
+               ANYOF_FLAGS(ret) |= ANYOF_NONBITMAP_NON_UTF8;
                namedclass = ANYOF_MAX;  /* no official name, but it's named */
 
                /* \p means they want Unicode semantics */