From edd7c787adc53f70a9d2790076e4c6d77a1f5324 Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 6 Sep 2007 12:33:45 +0000 Subject: * array.c (rb_ary_cycle): typo in rdoc. a patch from Yugui . [ruby-dev:31748] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- regerror.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'regerror.c') diff --git a/regerror.c b/regerror.c index b0cc71d18d..61187d4a61 100644 --- a/regerror.c +++ b/regerror.c @@ -209,7 +209,7 @@ static int to_ascii(OnigEncoding enc, UChar *s, UChar *end, buf[len++] = (UChar )code; } - p += enc_len(enc, p); + p += enc_len(enc, p, end); if (len >= buf_size) break; } @@ -330,15 +330,15 @@ onig_snprintf_with_pattern(buf, bufsize, enc, pat, pat_end, fmt, va_alist) while (p < pat_end) { if (*p == '\\') { *s++ = *p++; - len = enc_len(enc, p); + len = enc_len(enc, p, pat_end); while (len-- > 0) *s++ = *p++; } else if (*p == '/') { *s++ = (unsigned char )'\\'; *s++ = *p++; } - else if (ONIGENC_IS_MBC_HEAD(enc, p)) { - len = enc_len(enc, p); + else if (ONIGENC_IS_MBC_HEAD(enc, p, pat_end)) { + len = enc_len(enc, p, pat_end); if (ONIGENC_MBC_MINLEN(enc) == 1) { while (len-- > 0) *s++ = *p++; } -- cgit v1.2.3