summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-07-20 04:45:59 +0000
committerpfg <pfg@FreeBSD.org>2016-07-20 04:45:59 +0000
commite9d4bb286de33cda524b2ea79838257cff9889f3 (patch)
tree1f2d3fdab4b0f1b4edee25bc7922f4cae1d36363 /usr.bin
parentccb13f18cfd4b4fcbcd68c01609f4082564e190a (diff)
downloadFreeBSD-src-e9d4bb286de33cda524b2ea79838257cff9889f3.zip
FreeBSD-src-e9d4bb286de33cda524b2ea79838257cff9889f3.tar.gz
MFC r302973:
sed(1): Fix off by one introduced in r299211. Detected by running the gsed tests. Submitted by: Mikhail Teterin PR: 195929 Approved by: re (gjb)
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/sed/process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/sed/process.c b/usr.bin/sed/process.c
index b70a492..33eea13 100644
--- a/usr.bin/sed/process.c
+++ b/usr.bin/sed/process.c
@@ -450,7 +450,7 @@ substitute(struct s_command *cp)
regexec_e(re, ps, REG_NOTBOL, 0, le, psl));
/* Did not find the requested number of matches. */
- if (n > 1)
+ if (n > 0)
return (0);
/* Copy the trailing retained string. */
OpenPOWER on IntegriCloud