From 9d4cd46b82b4e5d05c26dc4fa40ef20174ca0355 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 9 Sep 2013 02:44:02 -0500 Subject: Fix [-group] argument dropping. --- lib/args.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/args.c b/lib/args.c index f6bc4827..5cdd3738 100644 --- a/lib/args.c +++ b/lib/args.c @@ -128,8 +128,8 @@ static int gotflag(struct getoptflagstate *gof, struct opts *opt) struct opts *clr; unsigned i = 1; - for (clr=gof->opts, i=1; ; clr = clr->next, i<<=1) - if (clr->arg && (i & toys.optflags)) clr->arg = 0; + for (clr=gof->opts, i=1; clr; clr = clr->next, i<<=1) + if (clr->arg && (i & toys.optflags)) *clr->arg = 0; toys.optflags &= ~opt->dex[0]; } toys.optflags |= opt->dex[1]; -- cgit v1.2.3