aboutsummaryrefslogtreecommitdiff
path: root/lib/xwrap.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2018-10-10 05:28:06 -0500
committerRob Landley <rob@landley.net>2018-10-10 05:28:06 -0500
commitc349e6f2e19281903fd8666cfeafe2f081fef66a (patch)
tree951c3a17dc03f14902a9d73c8435ec93d0de3cd0 /lib/xwrap.c
parentc276b8a8c2a5181558b976b9cb1d60a0180d560e (diff)
downloadtoybox-c349e6f2e19281903fd8666cfeafe2f081fef66a.tar.gz
Trivial speedup to format_iso_time(), teach parsetime() leading garbage != 0.
Diffstat (limited to 'lib/xwrap.c')
-rw-r--r--lib/xwrap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/xwrap.c b/lib/xwrap.c
index 7276151f..2c3b6041 100644
--- a/lib/xwrap.c
+++ b/lib/xwrap.c
@@ -795,6 +795,7 @@ long xparsetime(char *arg, long units, long *fraction)
long l;
char *end;
+ if (*arg != '.' && !isdigit(*arg)) error_exit("bad %s", arg);
if (CFG_TOYBOX_FLOAT) d = strtod(arg, &end);
else l = strtoul(arg, &end, 10);