зеркало из https://github.com/github/ruby.git
* enc/euc_jp.c (mbc_case_fold): check given string is valid or not,
and if invalid, return 1. [Bug #11486] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
5f0bb43434
Коммит
db152cd2dd
|
@ -1,3 +1,8 @@
|
|||
Sun Oct 4 15:11:48 2015 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* enc/euc_jp.c (mbc_case_fold): check given string is valid or not,
|
||||
and if invalid, return 1. [Bug #11486]
|
||||
|
||||
Sun Oct 4 10:09:57 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* dir.c (rb_dir_getwd): normalize OS path to UTF-8 on OS X.
|
||||
|
|
|
@ -378,11 +378,12 @@ mbc_case_fold(OnigCaseFoldType flag,
|
|||
return 1;
|
||||
}
|
||||
else {
|
||||
OnigCodePoint code;
|
||||
int len;
|
||||
|
||||
len = mbc_enc_len(p, end, enc);
|
||||
if (len <= 0) return 1;
|
||||
code = get_lower_case(mbc_to_code(p, end, enc));
|
||||
len = code_to_mbc(code, lower, enc);
|
||||
/* assuming case folding in euc-jp doesn't change length */
|
||||
(*pp) += len;
|
||||
return len; /* return byte length of converted char to lower */
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче