Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/bb_strtod.c')
-rw-r--r--libbb/bb_strtod.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libbb/bb_strtod.c b/libbb/bb_strtod.c
index 0515ff867..39bdeb5e5 100644
--- a/libbb/bb_strtod.c
+++ b/libbb/bb_strtod.c
@@ -17,7 +17,8 @@ double FAST_FUNC bb_strtod(const char *arg, char **endp)
double v;
char *endptr;
- if (arg[0] != '-' && NOT_DIGIT(arg[0]))
+ /* Allow .NN form. People want to use "sleep .15" etc */
+ if (arg[0] != '-' && arg[0] != '.' && NOT_DIGIT(arg[0]))
goto err;
errno = 0;
v = strtod(arg, &endptr);