summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-01-13 05:13:03 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-01-13 05:13:03 +0000
commit5486206ccef72a7855c113e32ebd79ff8fc5ab3b (patch)
tree6038278b43e213dd9fdcc42024bcec748b755c2b /regexec.c
parent8c01da3c85cbf27634336f1caf8397b60cbaa3e2 (diff)
downloadperl-5486206ccef72a7855c113e32ebd79ff8fc5ab3b.tar.gz
One more sharp s case found by Jeffrey.
p4raw-id: //depot/perl@14230
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/regexec.c b/regexec.c
index 3dba4c9ab0..3380ad55f6 100644
--- a/regexec.c
+++ b/regexec.c
@@ -2373,8 +2373,20 @@ S_regmatch(pTHX_ regnode *prog)
char *e = PL_regeol;
if (ibcmp_utf8(s, 0, ln, do_utf8,
- l, &e, 0, UTF))
- sayNO;
+ l, &e, 0, UTF)) {
+ /* One more case for the sharp s:
+ * pack("U0U*", 0xDF) =~ /ss/i,
+ * the 0xC3 0x9F are the UTF-8
+ * byte sequence for the U+00DF. */
+ if (!(do_utf8 &&
+ toLOWER(s[0]) == 's' &&
+ ln >= 2 &&
+ toLOWER(s[1]) == 's' &&
+ (U8)l[0] == 0xC3 &&
+ e - l >= 2 &&
+ (U8)l[1] == 0x9F))
+ sayNO;
+ }
locinput = e;
nextchr = UCHARAT(locinput);
break;