aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 549a4d892..6651bcf9a 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) {