diff options
| author | Tim J. Robbins <tjr@FreeBSD.org> | 2002-07-30 14:07:30 +0000 |
|---|---|---|
| committer | Tim J. Robbins <tjr@FreeBSD.org> | 2002-07-30 14:07:30 +0000 |
| commit | 0467aed3c9a021ab337652636ef39fd722eb91ee (patch) | |
| tree | 0175ce9f9701fe3ba34337b3c199844fe10eedb0 | |
| parent | d57327ee5032fb2b71fad1c59877cddf2fc079df (diff) | |
Notes
| -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 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; |
