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

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);