From c1e0e3d213c8ff11e0eeef6aecef3894e8ec6e96 Mon Sep 17 00:00:00 2001 From: Nick Ing-Simmons Date: Fri, 8 Aug 2003 21:36:56 +0100 Subject: UNICODE regexp bug Message-Id: <20030808193656.5109.1@llama.ni-s.u-net.com> p4raw-id: //depot/perl@20566 --- regexec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'regexec.c') 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() */ -- cgit v1.2.1