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:
parent
57f8914dfa
commit
8c3bbba824
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user