aboutsummaryrefslogtreecommitdiff
path: root/bin/expr
diff options
context:
space:
mode:
authorEitan Adler <eadler@FreeBSD.org>2012-03-19 00:45:01 +0000
committerEitan Adler <eadler@FreeBSD.org>2012-03-19 00:45:01 +0000
commit8c3bbba8241a0ae8804aa9d788f1475ab99e6080 (patch)
tree4630838f0ab47fa75552dac7a92c08ac073d0424 /bin/expr
parent57f8914dfa7cfe3e83f71def3514cd0571ace77c (diff)
downloadsrc-8c3bbba8241a0ae8804aa9d788f1475ab99e6080.tar.gz
src-8c3bbba8241a0ae8804aa9d788f1475ab99e6080.zip
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
Notes
Notes: svn path=/head/; revision=233137
Diffstat (limited to 'bin/expr')
-rw-r--r--bin/expr/expr.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/expr/expr.y b/bin/expr/expr.y
index 89f8cced337c..30704ed2818a 100644
--- a/bin/expr/expr.y
+++ b/bin/expr/expr.y
@@ -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);