aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim J. Robbins <tjr@FreeBSD.org>2002-07-30 14:07:30 +0000
committerTim J. Robbins <tjr@FreeBSD.org>2002-07-30 14:07:30 +0000
commit0467aed3c9a021ab337652636ef39fd722eb91ee (patch)
tree0175ce9f9701fe3ba34337b3c199844fe10eedb0
parentd57327ee5032fb2b71fad1c59877cddf2fc079df (diff)
Notes
-rw-r--r--usr.bin/sed/compile.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.bin/sed/compile.c b/usr.bin/sed/compile.c
index 8265ff8eaeeb..a97e01d8b296 100644
--- a/usr.bin/sed/compile.c
+++ b/usr.bin/sed/compile.c
@@ -172,8 +172,14 @@ compile_stream(link)
}
semicolon: EATSPACE();
- if (p && (*p == '#' || *p == '\0'))
- continue;
+ if (p) {
+ if (*p == '#' || *p == '\0')
+ continue;
+ else if (*p == ';') {
+ p++;
+ goto semicolon;
+ }
+ }
if ((*link = cmd = malloc(sizeof(struct s_command))) == NULL)
err(1, "malloc");
link = &cmd->next;