aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2024-04-08 13:48:09 -0500
committerRob Landley <rob@landley.net>2024-04-08 13:48:09 -0500
commit96d9f66127d84fba2f56f4754fc302e826968751 (patch)
tree972e81bcb4085fc05a212ba1314be442ef9d0925
parent207c985792a515d9c5a980d67ba8742fcd1e8518 (diff)
downloadtoybox-96d9f66127d84fba2f56f4754fc302e826968751.tar.gz
Thinko. (Reused a variable one line too early.)
-rw-r--r--lib/args.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/args.c b/lib/args.c
index dd57874e..9b94521d 100644
--- a/lib/args.c
+++ b/lib/args.c
@@ -209,8 +209,8 @@ static void gotflag(struct getoptflagstate *gof, struct opts *opt, int longopt)
} else if (type == '#' || type == '-' || type == '%') {
long long l = (type == '%') ? xparsemillitime(arg) : atolx(arg);
- arg = (type == '%') ? "ms" : "";
if (type == '-' && !ispunct(*arg)) l*=-1;
+ arg = (type == '%') ? "ms" : "";
if (l < opt->val[0].l) help_exit("-%c < %ld%s", opt->c, opt->val[0].l, arg);
if (l > opt->val[1].l) help_exit("-%c > %ld%s", opt->c, opt->val[1].l, arg);