1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 16:18:48 -05:00

Make --limit-rate [num] mean bytes. Seems I broke it back in november 2005...

This commit is contained in:
Daniel Stenberg 2006-02-01 23:26:14 +00:00
parent 5994b62930
commit 54cbd7e154

View File

@ -1512,7 +1512,9 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
char *unit;
curl_off_t value = curlx_strtoofft(nextarg, &unit, 0);
if(strlen(unit) != 1)
if(!*unit)
unit="b";
else if(strlen(unit) > 1)
unit=(char *)"w"; /* unsupported */
switch(*unit) {