diff options
author | Ashwini Sharma <ak.ashwini1981@gmail.com> | 2014-04-09 07:40:02 -0500 |
---|---|---|
committer | Ashwini Sharma <ak.ashwini1981@gmail.com> | 2014-04-09 07:40:02 -0500 |
commit | 882ca8bf5b19982a641c200e473d114b78aca3c2 (patch) | |
tree | fc97f5b29b4aca220733a3aae3275b9e9793061d /scripts/mkflags.c | |
parent | e6314da6fe9b251448e6a4a2cab12e256688ab5d (diff) | |
download | toybox-882ca8bf5b19982a641c200e473d114b78aca3c2.tar.gz |
_mkflags_ had an issue for generating FLAG_xxxx macros for long options.
Only the first __long__ option, without any __short__ option had a proper
flag value, rest all were defined to ZERO. Becaus the _flist_ was not moved
to the next in this case.
Diffstat (limited to 'scripts/mkflags.c')
-rw-r--r-- | scripts/mkflags.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/mkflags.c b/scripts/mkflags.c index 748e93d3..001007ef 100644 --- a/scripts/mkflags.c +++ b/scripts/mkflags.c @@ -117,7 +117,13 @@ int main(int argc, char *argv[]) flist->lopt = flist->lopt->next; } else sprintf(out, "#define FLAG_%s 0\n", aflist->lopt->command); aflist->lopt = aflist->lopt->next; - if (!aflist->command) aflist = aflist->next; + if (!aflist->command) { + aflist = aflist->next; + if (flist) { + flist = flist->next; + bit++; + } + } } else if (aflist->command) { if (flist && (!aflist->command || *aflist->command == *flist->command)) { |