diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/sed/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/sed/main.c b/usr.bin/sed/main.c index 1c5e885..5c67882 100644 --- a/usr.bin/sed/main.c +++ b/usr.bin/sed/main.c @@ -115,6 +115,7 @@ main(argc, argv) char *argv[]; { int c, fflag; + char *temp_arg; (void) setlocale(LC_ALL, ""); @@ -129,7 +130,10 @@ main(argc, argv) break; case 'e': eflag = 1; - add_compunit(CU_STRING, optarg); + temp_arg=xmalloc(strlen(optarg) + 2); + strcpy(temp_arg, optarg); + strcat(temp_arg, "\n"); + add_compunit(CU_STRING, temp_arg); break; case 'f': fflag = 1; |