]> granicus.if.org Git - curl/commitdiff
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 549a4d892379df6ec6ff4592de61e3d7e7439146..6651bcf9a867bf26d378539c6424fabb6df4000b 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) {