From 54cbd7e15445f3fa5881255c0d8282a61e4617e6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 1 Feb 2006 23:26:14 +0000 Subject: [PATCH] Make --limit-rate [num] mean bytes. Seems I broke it back in november 2005... --- src/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 549a4d8923..6651bcf9a8 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) {