[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
PATCH [perl #59342] chr(0400) =~ /\400/ fails for >= 400
This is my first time submitting a patch. Hopefully I'm doing it the
way I should be.
The regcomp.c code failed to set a flag that it does in all other cases
when a character value is above 255.
--- regcomp.c.orig 2008-10-18 12:16:42.000000000 -0600
+++ regcomp.c 2008-10-24 10:22:24.000000000 -0600
@@ -7417,6 +7417,7 @@
I32 flags = 0;
STRLEN numlen = 3;
ender = grok_oct(p, &numlen, &flags, NULL);
+ if (ender > 0xff) RExC_utf8 = 1;
p += numlen;
}
else {
--- t/op/re_tests.orig 2008-09-22 14:42:42.000000000 -0600
+++ t/op/re_tests 2008-10-24 10:51:35.000000000 -0600
@@ -1357,3 +1357,8 @@
/^\s*i.*?o\s*$/s io\n io y - -
# As reported in #59168 by Father Chrysostomos:
/(.*?)a(?!(a+)b\2c)/ baaabaac y $&-$1 baa-ba
+
+# #59342
+/\377/ \377 y $& \377
+/\400/ \400 y $& \400
+/\777/ \777 y $& \777
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]