summaryrefslogtreecommitdiff
path: root/regex.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-09 04:53:16 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-09 04:53:16 +0000
commit655e96fa59f62f7d31b2d9d470947f97aceb7b92 (patch)
tree6b6bb0a6ce9e46b326dbde9378c3791a54be1dd5 /regex.c
parent2a34f89e354071d09c64a93bf3498dfa108f3e8c (diff)
2000-05-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/regex.c b/regex.c
index c4b0ee3..9ddc475 100644
--- a/regex.c
+++ b/regex.c
@@ -2977,23 +2977,22 @@ re_compile_fastmap(bufp)
for (j = 0,c = 0;j < (int)size; j++) {
unsigned int cc = EXTRACT_MBC(&p[j*8]);
beg = WC2MBC1ST(cc);
- while (c < beg) {
+ while (c <= beg) {
if (ismbchar(c))
fastmap[c] = 1;
c++;
}
cc = EXTRACT_MBC(&p[j*8+4]);
- beg = WC2MBC1ST(cc);
if (cc < 0xff) {
num_literal = 1;
- while (c <= beg) {
+ while (c <= cc) {
if (ismbchar(c))
fastmap[c] = 1;
c++;
}
}
- c = beg + 1;
+ c = WC2MBC1ST(cc);
}
for (j = c; j < (1 << BYTEWIDTH); j++) {