diff options
-rw-r--r-- | usr.bin/sed/compile.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.bin/sed/compile.c b/usr.bin/sed/compile.c index 8265ff8..a97e01d 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; |