diff --git a/usr.bin/sed/process.c b/usr.bin/sed/process.c index b70a492349ad..33eea13bac5f 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. */