aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tool_getparam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index 5dc4141fa..4e06cd61e 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -958,7 +958,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
err = str2unum(&config->localportrange, lrange);
if(err || (config->localportrange > 65535))
return PARAM_BAD_USE;
- config->localportrange -= config->localport;
+ config->localportrange -= (config->localport-1);
if(config->localportrange < 1)
return PARAM_BAD_USE;
}