diff options
author | jmallett <jmallett@FreeBSD.org> | 2002-04-05 05:40:20 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2002-04-05 05:40:20 +0000 |
commit | 51d6548d5c0478abde7b6225308943f7d2c43489 (patch) | |
tree | 152346376e350b789257e048ed9acc38f4a47139 /usr.bin/sed | |
parent | ae63b18663b5bab526cc17837418c62e362b3b39 (diff) | |
download | FreeBSD-src-51d6548d5c0478abde7b6225308943f7d2c43489.zip FreeBSD-src-51d6548d5c0478abde7b6225308943f7d2c43489.tar.gz |
Fix sed(1) behaviour for 'G' when given null holdspace by making sure it
contains a \n.
PR: misc/26153
Submitted by: ashp
Reviewed by: mike
Obtained from: NetBSD
MFC after: 2 days
Diffstat (limited to 'usr.bin/sed')
-rw-r--r-- | usr.bin/sed/process.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/sed/process.c b/usr.bin/sed/process.c index bffa108..ff3cb19 100644 --- a/usr.bin/sed/process.c +++ b/usr.bin/sed/process.c @@ -148,6 +148,8 @@ redirect: cspace(&PS, hs, hsl, REPLACE); break; case 'G': + if (hs == NULL) + cspace(&HS, "\n", 1, REPLACE); cspace(&PS, hs, hsl, 0); break; case 'h': |