1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

merge Oniguruma 4.4.4

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kosako 2006-09-23 12:01:58 +00:00
parent b6ec2b7c6d
commit d5a00279f4
4 changed files with 24 additions and 9 deletions

View file

@ -3066,19 +3066,19 @@ bm_search_notrev(regex_t* reg, const UChar* target, const UChar* target_end,
(int )text, (int )text_end, (int )text_range);
#endif
tlen1 = (target_end - target) - 1;
end = text_range + tlen1;
if (end > text_end)
end = text_end;
tail = target_end - 1;
tlen1 = tail - target;
end = text_range;
if (end + tlen1 > text_end)
end = text_end - tlen1;
s = text;
if (IS_NULL(reg->int_map)) {
while (s < end) {
p = se = s + tlen1;
t = tail;
while (*p == *t && t >= target) {
while (t >= target && *p == *t) {
p--; t--;
}
if (t < target) return (UChar* )s;
@ -3094,7 +3094,7 @@ bm_search_notrev(regex_t* reg, const UChar* target, const UChar* target_end,
while (s < end) {
p = se = s + tlen1;
t = tail;
while (*p == *t && t >= target) {
while (t >= target && *p == *t) {
p--; t--;
}
if (t < target) return (UChar* )s;