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) {