diff options
Diffstat (limited to 'usr.bin/osh/osh.c')
-rw-r--r-- | usr.bin/osh/osh.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.bin/osh/osh.c b/usr.bin/osh/osh.c index d458173..47ea695 100644 --- a/usr.bin/osh/osh.c +++ b/usr.bin/osh/osh.c @@ -310,6 +310,11 @@ open_script(const char *pathname) } while (read(fd, &c, 1) > 0) { + /* Skip blank newlines */ + if (c == '\n' && buf_i == 0) { + continue; + } + if (buf_i >= sizeof(buf) - 1) { buf_i = 0; } |