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
f760bee50d
commit
399d1617d8
@ -450,7 +450,7 @@ substitute(struct s_command *cp)
|
|||||||
regexec_e(re, ps, REG_NOTBOL, 0, le, psl));
|
regexec_e(re, ps, REG_NOTBOL, 0, le, psl));
|
||||||
|
|
||||||
/* Did not find the requested number of matches. */
|
/* Did not find the requested number of matches. */
|
||||||
if (n > 1)
|
if (n > 0)
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
/* Copy the trailing retained string. */
|
/* Copy the trailing retained string. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user