From 029659c1d589a984728dcce609657601d219caa8 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 1 Oct 2006 21:46:48 +0000 Subject: [PATCH] fix regexp bug in checking too far for regmust svn: r4460 --- src/mzscheme/src/regexp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mzscheme/src/regexp.c b/src/mzscheme/src/regexp.c index 593a9b1cd6..18049c064d 100644 --- a/src/mzscheme/src/regexp.c +++ b/src/mzscheme/src/regexp.c @@ -2315,10 +2315,10 @@ regexec(const char *who, if ((spos - stringpos) + l <= stringlen) { if (prog->flags & REGEXP_MUST_CI) - pos = l_strchr_ci(string, spos, stringlen - (l - 1), + pos = l_strchr_ci(string, spos, stringlen - (spos - stringpos) - (l - 1), (ITO(prog->program, (char *)prog) XFORM_OK_PLUS prog->regmust)[0]); else - pos = l_strchr(string, spos, stringlen - (l - 1), + pos = l_strchr(string, spos, stringlen - (spos - stringpos) - (l - 1), (ITO(prog->program, (char *)prog) XFORM_OK_PLUS prog->regmust)[0]); if (pos == -1) return 0; /* Not present. */