diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/rs/rs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/rs/rs.c b/usr.bin/rs/rs.c index fd15b26..23fa270 100644 --- a/usr.bin/rs/rs.c +++ b/usr.bin/rs/rs.c @@ -126,14 +126,17 @@ getfile(void) char *p; char *endp; char **ep; + int c; int multisep = (flags & ONEISEPONLY ? 0 : 1); int nullpad = flags & NULLPAD; char **padto; while (skip--) { - getline(); + c = getline(); if (flags & SKIPPRINT) puts(curline); + if (c == EOF) + return; } getline(); if (flags & NOARGS && curlen < owidth) |