From 510b6af4bead6f83dc62020250960875764b1d09 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 19 Sep 2002 00:40:09 +0000 Subject: [PATCH] (re_search_2): Fix previous change. --- src/regex.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/regex.c b/src/regex.c index b2dc4d51df5..a7ded877515 100644 --- a/src/regex.c +++ b/src/regex.c @@ -4075,15 +4075,16 @@ re_search_2 (bufp, str1, size1, str2, size2, startpos, range, regs, stop) } } else if (multibyte && ! target_multibyte) - { - buf_ch = *d; - MAKE_CHAR_MULTIBYTE (buf_ch); - if (fastmap[CHAR_LEADING_CODE (buf_ch)]) - break; + while (range > lim) + { + buf_ch = *d; + MAKE_CHAR_MULTIBYTE (buf_ch); + if (fastmap[CHAR_LEADING_CODE (buf_ch)]) + break; - d++; - range--; - } + d++; + range--; + } else while (range > lim && !fastmap[*d]) { -- 2.39.5