summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-07-20 04:49:01 +0000
committerpfg <pfg@FreeBSD.org>2016-07-20 04:49:01 +0000
commita64caf4afbf47fec693a39f291f0a73bef78e5bd (patch)
treebfd0d8bfb649149204a7436c1638745436c61e74 /usr.bin
parent67a09024ed0bf810c4a85dce2342f5efd7349a5f (diff)
downloadFreeBSD-src-a64caf4afbf47fec693a39f291f0a73bef78e5bd.zip
FreeBSD-src-a64caf4afbf47fec693a39f291f0a73bef78e5bd.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
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 891a7ce..4945ac6 100644
--- a/usr.bin/sed/process.c
+++ b/usr.bin/sed/process.c
@@ -440,7 +440,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