aboutsummaryrefslogtreecommitdiff
path: root/posix/regexec.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-08-26 22:42:03 +0000
committerUlrich Drepper <drepper@redhat.com>2002-08-26 22:42:03 +0000
commit3081c7c528e928e318b3ef5169ead6822a0338ca (patch)
treed454088f72b175f52c24cedb2a1c5e122b9edcc5 /posix/regexec.c
parentcc7375ce023cc075be51e0a3dfc5f4b0700163a7 (diff)
downloadglibc-3081c7c528e928e318b3ef5169ead6822a0338ca.tar
glibc-3081c7c528e928e318b3ef5169ead6822a0338ca.tar.gz
glibc-3081c7c528e928e318b3ef5169ead6822a0338ca.tar.bz2
glibc-3081c7c528e928e318b3ef5169ead6822a0338ca.zip
(re_search_stub): Return correct match length if start != 0.
Diffstat (limited to 'posix/regexec.c')
-rw-r--r--posix/regexec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/posix/regexec.c b/posix/regexec.c
index 74e3ab5cd2..f9b162b13c 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;