Make --limit-rate [num] mean bytes. Seems I broke it back in november 2005...
authorDaniel Stenberg <daniel@haxx.se>
Wed, 1 Feb 2006 23:26:14 +0000 (23:26 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 1 Feb 2006 23:26:14 +0000 (23:26 +0000)
src/main.c

index 549a4d8..6651bcf 100644 (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) {