Commit 958dac64 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Fix off-by-one error in previous commit

The default (when no argument to the '-l' option is provided) is to use
the last_few_callers value from the modopts.ini file. This was broken.
parent 5e428c35
......@@ -87,7 +87,7 @@ function print(hdr, num, days_ago)
var argi = argv.indexOf('-l');
if(argi >= 0) { // Last few callers?
var count = -options.last_few_callers;
if(argi < argc)
if(argi + 1 < argc)
count = -parseInt(argv[argi + 1], 10);
if(!this.print(options.last_few_callers_msg || "\x01n\x01g\x01hLast few callers:\x01n\r\n"
,count, options.last_few_days))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment