allow -r/--redirect 0

Disable redirections in this case.
master
tiptorrent development team 2022-02-10 15:39:37 +01:00
parent 8b6f56c76e
commit 95a6724e1d
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ int main(int argc, char *argv[])
if (optind < argc &&
argv[optind][0] != '-') {
max_redirect = atoi(argv[optind++]);
if (max_redirect <= 0) {
if (max_redirect < 0) {
syslog(LOG_ERR, "Invalid number for redirections");
return EXIT_FAILURE;
}