diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-05-18 06:06:17 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-05-18 06:06:17 +0000 |
commit | df5a9e28234919326128db50c13467d971871cbf (patch) | |
tree | 79a6e234266f7a54fc3c657a7752fe74943748db /regex.c | |
parent | c59869494a1a299cad47676e626cfc918c92364e (diff) |
mbc bug in regex
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regex.c')
-rw-r--r-- | regex.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -2968,9 +2968,11 @@ re_search(bufp, string, size, startpos, range, regs) while (range > 0) { c = *p++; if (ismbchar(c)) { - int len = mbclen(c) - 1; + int len; + if (fastmap[c]) break; + len = mbclen(c) - 1; while (len--) { c = *p++; range--; @@ -2981,8 +2983,8 @@ re_search(bufp, string, size, startpos, range, regs) else { if (fastmap[MAY_TRANSLATE() ? translate[c] : c]) break; - range--; } + range--; } startpos_adjust: startpos += irange - range; |