summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2022-07-19 22:53:10 +0200
committerpgen <p.gen.progs@gmail.com>2022-07-19 23:08:19 +0200
commit848c6253ac55373bf0c4ef4e5eb12a8921865d21 (patch)
tree9237a93a478bc2a4d9a4fd99e8d2ffd2211b434a
parentccfa498b47c90db1d0cd66d5815f13abc531dfeb (diff)
Allow multiple instances of the "-limits" option
Also corrects a word limit check error.
-rw-r--r--smenu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/smenu.c b/smenu.c
index cff0104..b7e36a8 100644
--- a/smenu.c
+++ b/smenu.c
@@ -6809,7 +6809,7 @@ main(int argc, char * argv[])
"[visual_bell] "
"[ignore_quotes] "
"[incremental_search] "
- "[limits #limit:value...] "
+ "[limits... #limit:value...] "
"[forgotten_timeout #timeout] "; /* don't remove this space! */
main_spec_options = "[*copyright] "
@@ -8505,7 +8505,7 @@ main(int argc, char * argv[])
/* One more word... */
/* """""""""""""""" */
- if (count == limits.words)
+ if (count + 1 >= limits.words)
{
fprintf(stderr,
"The number of read words has reached the limit of %ld.\n",