(re_search_stub): Return correct match length if start != 0.

This commit is contained in:
Ulrich Drepper 2002-08-26 22:42:03 +00:00
parent cc7375ce02
commit 3081c7c528
1 changed files with 2 additions and 2 deletions

View File

@ -371,8 +371,8 @@ re_search_stub (bufp, string, length, start, range, stop, regs, ret_len)
{ {
if (ret_len) if (ret_len)
{ {
assert (pmatch[0].rm_so == 0); assert (pmatch[0].rm_so == start);
rval = pmatch[0].rm_eo; rval = pmatch[0].rm_eo - start;
} }
else else
rval = pmatch[0].rm_so; rval = pmatch[0].rm_so;