summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-12-30 23:12:17 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-30 23:12:17 +0000
commit2ad154feab0e255cadacb1ad90bde4145e7d573e (patch)
tree19e19708ae633233d3c66cee883fe906f9d41c36 /regexec.c
parent2ddfca77c091e81a547f3b4f6325ece2309ec9f0 (diff)
downloadperl-2ad154feab0e255cadacb1ad90bde4145e7d573e.tar.gz
Four wrongs can make a right.
p4raw-id: //depot/perl@13965
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/regexec.c b/regexec.c
index 3860fd29d1..dfb01ed907 100644
--- a/regexec.c
+++ b/regexec.c
@@ -979,8 +979,8 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta
while (s <= e) {
if ( utf8_to_uvchr((U8*)s, &len) == c1
&& (ln == len ||
- ibcmp_utf8(s, do_utf8, (I32)(strend - s),
- m, UTF, (I32)ln))
+ !ibcmp_utf8(s, do_utf8, (I32)(strend - s),
+ m, UTF, (I32)ln))
&& (norun || regtry(prog, s)) )
goto got_it;
s += len;
@@ -1002,8 +1002,9 @@ 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)
- && ibcmp_utf8(s, do_utf8, (I32)(strend - s),
- m, UTF, (I32)ln)
+ && (ln == len ||
+ !ibcmp_utf8(s, do_utf8, (I32)(strend - s),
+ m, UTF, (I32)ln))
&& (norun || regtry(prog, s)) )
goto got_it;
s += len;