summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2014-01-29 14:38:00 -0700
committerKarl Williamson <public@khwilliamson.com>2014-01-29 14:51:55 -0700
commit6e79ab66ceb8b6d6046d356b6b4eba9c98b33599 (patch)
tree7f30569a5f811c3d3c206346d2e6a3a42b55faef /regcomp.c
parent69e3da3c82c173aa3d9eb8701fef83e86ae166f5 (diff)
downloadperl-6e79ab66ceb8b6d6046d356b6b4eba9c98b33599.tar.gz
regcomp.c: Process all POSIXes in [...] under /l
Commit 31f05a37 introduced a regression in which if you have something like /[\s\d[:punct:]/, all but the final class were ignored. This was due to initialization happening every time through the loop, instead of the first time needed.
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/regcomp.c b/regcomp.c
index e4f6c86bfd..dfbaec8089 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -13581,6 +13581,11 @@ parseit:
else {
RExC_emit += ANYOF_POSIXL_FOLD_SKIP - ANYOF_SKIP;
}
+
+ /* We need to initialize this here because this node type has
+ * this field, and will skip getting initialized when we get to
+ * a posix class since are doing it here */
+ ANYOF_POSIXL_ZERO(ret);
}
if (ANYOF_LOCALE == ANYOF_POSIXL
|| (namedclass > OOB_NAMEDCLASS
@@ -13594,8 +13599,8 @@ parseit:
else {
RExC_emit += ANYOF_POSIXL_SKIP - ANYOF_SKIP;
}
+ ANYOF_POSIXL_ZERO(ret);
}
- ANYOF_POSIXL_ZERO(ret);
ANYOF_FLAGS(ret) |= ANYOF_POSIXL;
}
}