summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/sed/compile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.bin/sed/compile.c b/usr.bin/sed/compile.c
index bafb339a4b5d..f05d45fc6b40 100644
--- a/usr.bin/sed/compile.c
+++ b/usr.bin/sed/compile.c
@@ -746,6 +746,9 @@ compile_text(void)
while (cu_fgets(lbuf, sizeof(lbuf), NULL) != NULL) {
op = s = text + size;
p = lbuf;
+#ifdef LEGACY_BSDSED_COMPAT
+ EATSPACE();
+#endif
for (esc_nl = 0; *p != '\0'; p++) {
if (*p == '\\' && p[1] != '\0' && *++p == '\n')
esc_nl = 1;