summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-12-30 23:30:56 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-30 23:30:56 +0000
commit92c9c481ba1637c65512c039f00553621807bfd9 (patch)
tree96da3f67d67284cca3e8e57b701cbac5b2c61f76
parent2ad154feab0e255cadacb1ad90bde4145e7d573e (diff)
downloadperl-92c9c481ba1637c65512c039f00553621807bfd9.tar.gz
Make that six wrongs.
p4raw-id: //depot/perl@13966
-rw-r--r--regexec.c2
-rw-r--r--utf8.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/regexec.c b/regexec.c
index dfb01ed907..cb56bab59b 100644
--- a/regexec.c
+++ b/regexec.c
@@ -1002,7 +1002,7 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta
c == (UV)UNICODE_GREEK_SMALL_LETTER_FINAL_SIGMA)
c = (UV)UNICODE_GREEK_SMALL_LETTER_SIGMA;
if ( (c == c1 || c == c2 || f == c1 || f == c2)
- && (ln == len ||
+ && (ln == len || ln == foldlen ||
!ibcmp_utf8(s, do_utf8, (I32)(strend - s),
m, UTF, (I32)ln))
&& (norun || regtry(prog, s)) )
diff --git a/utf8.c b/utf8.c
index 0453d1b763..54ab5293cc 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1703,8 +1703,7 @@ Perl_ibcmp_utf8(pTHX_ const char *s1, bool u1, register I32 len1, const char *s2
else
ulen2 = 1;
if (ulen1 != ulen2
- || (ca < 256 && cb < 256 &&
- PL_fold[ca] != PL_fold[cb])
+ || (ca < 256 && cb < 256 && ca != PL_fold[cb])
|| memNE((char *)tmpbuf1, (char *)tmpbuf2, ulen1))
return 1; /* mismatch */
}