summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/sed/process.c2
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':
OpenPOWER on IntegriCloud