merge revision(s) 39547: [Backport #7972] [Backport #7974]

* Merge Onigmo 0fe387da2fee089254f6b04990541c731a26757f
	  v5.13.3 [Bug#7972] [Bug#7974]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagachika 2013-03-26 17:59:06 +00:00
parent 5c2169d4c7
commit 0ce7a947d5
9 changed files with 81 additions and 57 deletions

View file

@ -231,7 +231,7 @@ code_to_mbclen(OnigCodePoint code, OnigEncoding enc ARG_UNUSED)
}
else if (code <= 0xffff) {
int low = code & 0xff;
if (low < 0x40 || low == 0x7f || 0xfc < low)
if (! SJIS_ISMB_TRAIL(low))
return ONIGERR_INVALID_CODE_POINT_VALUE;
return 2;
}