aboutsummaryrefslogtreecommitdiff
path: root/posix/regexec.c
diff options
context:
space:
mode:
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;