summaryrefslogtreecommitdiffstats
path: root/usr.bin/more
diff options
context:
space:
mode:
authorhoek <hoek@FreeBSD.org>1998-07-04 01:22:07 +0000
committerhoek <hoek@FreeBSD.org>1998-07-04 01:22:07 +0000
commit55e338f3271bf377461cd9d9f2ffcae7a36ccafa (patch)
tree27b67a2e0e97e5ff350178a7f11edb5a56d335d9 /usr.bin/more
parent7af268b85d2a6445b4292c10922f57e40881067d (diff)
downloadFreeBSD-src-55e338f3271bf377461cd9d9f2ffcae7a36ccafa.zip
FreeBSD-src-55e338f3271bf377461cd9d9f2ffcae7a36ccafa.tar.gz
Fix bug from last commit: don't SEGV when reading as part of a pipe.
Diffstat (limited to 'usr.bin/more')
-rw-r--r--usr.bin/more/command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/more/command.c b/usr.bin/more/command.c
index 71f6088..a8785d2 100644
--- a/usr.bin/more/command.c
+++ b/usr.bin/more/command.c
@@ -512,7 +512,7 @@ again: if (sigs)
number, wsearch);
break;
case A_HELP: /* help */
- if (!strcmp(_PATH_HELPFILE, av[curr_ac])) {
+ if (ac > 0 && !strcmp(_PATH_HELPFILE, av[curr_ac])) {
error("Already viewing help.");
break;
}
OpenPOWER on IntegriCloud