svn commit: trunk/busybox/libbb
vda at busybox.net
vda at busybox.net
Sat Oct 18 19:18:51 UTC 2008
Author: vda
Date: 2008-10-18 12:18:51 -0700 (Sat, 18 Oct 2008)
New Revision: 23714
Log:
libbb: do not reject floating point strings like ".15"
Modified:
trunk/busybox/libbb/bb_strtod.c
Changeset:
Modified: trunk/busybox/libbb/bb_strtod.c
===================================================================
--- trunk/busybox/libbb/bb_strtod.c 2008-10-18 19:15:57 UTC (rev 23713)
+++ trunk/busybox/libbb/bb_strtod.c 2008-10-18 19:18:51 UTC (rev 23714)
@@ -17,7 +17,8 @@
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);
More information about the busybox-cvs
mailing list