* regexec.c (match_at): add end point to enclen's argument.

This only effect on compilinig with -DONIG_DEBUG_MATCH.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2010-07-14 09:22:39 +00:00
parent 2dbc92b07d
commit 9ac0263c2f
2 changed files with 7 additions and 2 deletions

View file

@ -1300,13 +1300,13 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
s = (UChar* )sstart;
while (1) {
#ifdef ONIG_DEBUG_MATCH
{
if (s) {
UChar *q, *bp, buf[50];
int len;
fprintf(stderr, "%4d> \"", (int )(s - str));
bp = buf;
for (i = 0, q = s; i < 7 && q < end; i++) {
len = enclen(encode, q);
len = enclen(encode, q, end);
while (len-- > 0) *bp++ = *q++;
}
if (q < end) { xmemcpy(bp, "...\"", 4); bp += 4; }