sed(1): Fix off by one introduced in r299211.
Detected by running the gsed tests. Submitted by: Mikhail Teterin PR: 195929 MFC after: 3 days
This commit is contained in:
parent
d73abd4b09
commit
4386fba70c
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user