mirror of
https://git.busybox.net/busybox
synced 2026-01-31 16:43:21 +00:00
libbb: do not reject floating point strings like ".15"
This commit is contained in:
parent
f9dde919d6
commit
3ab3d8a5cf
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue