diff options
| author | svn2git <svn2git@FreeBSD.org> | 1994-05-01 08:00:00 +0000 |
|---|---|---|
| committer | svn2git <svn2git@FreeBSD.org> | 1994-05-01 08:00:00 +0000 |
| commit | a16f65c7d117419bd266c28a1901ef129a337569 (patch) | |
| tree | 2626602f66dc3551e7a7c7bc9ad763c3bc7ab40a /usr.bin/elvis/cmd2.c | |
| parent | 8503f4f13f77abf7adc8f7e329c6f9c1d52b6a20 (diff) | |
Diffstat (limited to 'usr.bin/elvis/cmd2.c')
| -rw-r--r-- | usr.bin/elvis/cmd2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/elvis/cmd2.c b/usr.bin/elvis/cmd2.c index 361799f85e9f..25192c0b52da 100644 --- a/usr.bin/elvis/cmd2.c +++ b/usr.bin/elvis/cmd2.c @@ -260,9 +260,11 @@ void cmd_substitute(frommark, tomark, cmd, bang, extra) /* substitute for the matched part */ #ifdef REGEX - regsub(rm, startp, endp, subst, d); + if (regsub(rm, startp, endp, subst, d) < 0) + return; #else - regsub(re, subst, d); + if (regsub(re, subst, d) < 0) + return; #endif #ifdef REGEX s = endp; |
