From: Ulrich Drepper Date: Mon, 26 Aug 2002 22:42:03 +0000 (+0000) Subject: (re_search_stub): Return correct match length if start != 0. X-Git-Tag: cvs/glibc-2-3~361 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3081c7c528e928e318b3ef5169ead6822a0338ca;p=thirdparty%2Fglibc.git (re_search_stub): Return correct match length if start != 0. --- diff --git a/posix/regexec.c b/posix/regexec.c index 74e3ab5cd21..f9b162b13c7 100644 --- a/posix/regexec.c +++ b/posix/regexec.c @@ -371,8 +371,8 @@ re_search_stub (bufp, string, length, start, range, stop, regs, ret_len) { if (ret_len) { - assert (pmatch[0].rm_so == 0); - rval = pmatch[0].rm_eo; + assert (pmatch[0].rm_so == start); + rval = pmatch[0].rm_eo - start; } else rval = pmatch[0].rm_so;