diff options
author | Kenichi Handa <handa@m17n.org> | 2002-09-19 00:40:09 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2002-09-19 00:40:09 +0000 |
commit | 4235e8edbcdb4af3955b4176555454fe4e4798a8 (patch) | |
tree | 924bd911b0115bb348e1176a621428c2f406089c /src | |
parent | 033572a5dcdba5abc11d5585f87652849bc5bd5a (diff) | |
download | emacs-4235e8edbcdb4af3955b4176555454fe4e4798a8.tar.gz |
(re_search_2): Fix previous change.
Diffstat (limited to 'src')
-rw-r--r-- | src/regex.c | 17 |
1 files 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]) { |