projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f9dde91
)
libbb: do not reject floating point strings like ".15"
author
Denis Vlasenko
<vda.linux@googlemail.com>
Sat, 18 Oct 2008 19:18:51 +0000
(19:18 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Sat, 18 Oct 2008 19:18:51 +0000
(19:18 -0000)
libbb/bb_strtod.c
patch
|
blob
|
history
diff --git
a/libbb/bb_strtod.c
b/libbb/bb_strtod.c
index 0515ff8678e6480368727f0703a10bdb017502c2..39bdeb5e54280c41e694f3ad307f822e62dede4f 100644
(file)
--- 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);