diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-04-24 15:15:22 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-04-24 15:15:22 +0000 |
commit | b068b82ca120da7ee943c4d4a80b4623026afafa (patch) | |
tree | b7de43ca8e17d39f18d78a1aa894d2616eb99975 /regex.c | |
parent | d23b7958c50439b3ec70c0c9d3011798c09a8ceb (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |