summaryrefslogtreecommitdiffstats
path: root/usr.bin/more
diff options
context:
space:
mode:
authoradam <adam@FreeBSD.org>1996-01-22 01:30:03 +0000
committeradam <adam@FreeBSD.org>1996-01-22 01:30:03 +0000
commitda0ede4916e70f4882af75670671c00d8df6e100 (patch)
tree139250600e41bbf88c0fe04cd55e2feb47db43b1 /usr.bin/more
parentfb2cd624b1e23a9dcc51c56dbb9e66ed16667c8d (diff)
downloadFreeBSD-src-da0ede4916e70f4882af75670671c00d8df6e100.zip
FreeBSD-src-da0ede4916e70f4882af75670671c00d8df6e100.tar.gz
'more | cat' was producing spurious output from an unused buffer
Diffstat (limited to 'usr.bin/more')
-rw-r--r--usr.bin/more/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/more/main.c b/usr.bin/more/main.c
index 852b1f8..4c2e36b 100644
--- a/usr.bin/more/main.c
+++ b/usr.bin/more/main.c
@@ -288,7 +288,8 @@ main(argc, argv)
*/
if (ac < 1) {
(void)edit("-");
- cat_file();
+ if (file >= 0)
+ cat_file();
} else {
do {
(void)edit((char *)NULL);
OpenPOWER on IntegriCloud