From: Daniel Stenberg Date: Wed, 1 Feb 2006 23:26:14 +0000 (+0000) Subject: Make --limit-rate [num] mean bytes. Seems I broke it back in november 2005... X-Git-Tag: upstream/7.37.1~10533 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=54cbd7e15445f3fa5881255c0d8282a61e4617e6;p=platform%2Fupstream%2Fcurl.git Make --limit-rate [num] mean bytes. Seems I broke it back in november 2005... --- diff --git a/src/main.c b/src/main.c index 549a4d8..6651bcf 100644 --- a/src/main.c +++ b/src/main.c @@ -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) {