summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2003-08-08 21:36:56 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2003-08-08 19:47:45 +0000
commitc1e0e3d213c8ff11e0eeef6aecef3894e8ec6e96 (patch)
tree50af711fbb5b6775d15cfff884176b63448ed9d7 /regexec.c
parent5c1546dc48d585e2ab2e244b01f0213280b12017 (diff)
downloadperl-c1e0e3d213c8ff11e0eeef6aecef3894e8ec6e96.tar.gz
UNICODE regexp bug
Message-Id: <20030808193656.5109.1@llama.ni-s.u-net.com> p4raw-id: //depot/perl@20566
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/regexec.c b/regexec.c
index 11279337ea..d4cf4ed7ea 100644
--- a/regexec.c
+++ b/regexec.c
@@ -1034,7 +1034,9 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta
c1 = *(U8*)m;
c2 = PL_fold_locale[c1];
do_exactf:
- e = HOP3c(strend, -(I32)ln, s);
+ /* The last byte to try is ln-1 characters before strend
+ * since the strend points one byte past the string. */
+ e = HOP3c(strend, (I32)1 - (I32)ln, s);
if (norun && e < s)
e = s; /* Due to minlen logic of intuit() */