rm[0].rm_so must be zero (an explicit check is made for zero in the

outer if condition)

Reviewed by:	se
Approved by:	cperciva
This commit is contained in:
Eitan Adler 2012-03-19 00:45:01 +00:00
parent 57f8914dfa
commit 8c3bbba824
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=233137

View File

@ -540,7 +540,7 @@ op_colon(struct val *a, struct val *b)
v = make_str(a->u.s + rm[1].rm_so);
} else
v = make_integer((intmax_t)(rm[0].rm_eo - rm[0].rm_so));
v = make_integer((intmax_t)(rm[0].rm_eo));
else
if (rp.re_nsub == 0)
v = make_integer((intmax_t)0);