summaryrefslogtreecommitdiff
path: root/regex.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-04-24 15:15:22 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-04-24 15:15:22 +0000
commitb068b82ca120da7ee943c4d4a80b4623026afafa (patch)
treeb7de43ca8e17d39f18d78a1aa894d2616eb99975 /regex.c
parentd23b7958c50439b3ec70c0c9d3011798c09a8ceb (diff)
* regex.c (re_compile_pattern): should check if c is not a
multibyte chracter. a patch from KIMURA Koichi <kimura.koichi at canon.co.jp>. [ruby-dev:28598] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regex.c b/regex.c
index 7717835c92..f2cd249060 100644
--- a/regex.c
+++ b/regex.c
@@ -1705,7 +1705,7 @@ re_compile_pattern(pattern, size, bufp)
goto range_retry;
}
else {
- if (TRANSLATE_P()) c = (unsigned char)translate[c];
+ if (TRANSLATE_P() && c < 0x100) c = (unsigned char)translate[c];
if (had_mbchar == 0 && (!current_mbctype || !had_num_literal)) {
SET_LIST_BIT(c);
had_num_literal = 0;