tool_urlglob: use curl_off_t instead of longs

To handle more globs better (especially on Windows)

Closes #11224
This commit is contained in:
Daniel Stenberg 2023-05-30 14:06:15 +02:00
parent a1730b6106
commit 0807fd72f9
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 31 additions and 26 deletions

View file

@ -2408,15 +2408,19 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
case '\0': /* --parallel */
global->parallel = toggle;
break;
case 'b': /* --parallel-max */
err = str2unum(&global->parallel_max, nextarg);
case 'b': { /* --parallel-max */
long val;
err = str2unum(&val, nextarg);
if(err)
return err;
if(global->parallel_max > MAX_PARALLEL)
if(val > MAX_PARALLEL)
global->parallel_max = MAX_PARALLEL;
else if(global->parallel_max < 1)
else if(val < 1)
global->parallel_max = PARALLEL_DEFAULT;
else
global->parallel_max = (unsigned short)val;
break;
}
case 'c': /* --parallel-connect */
global->parallel_connect = toggle;
break;